From 4c1e13fd453596d4cdf86208d3dd3e117aa229e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sun, 25 Jan 2015 17:25:45 +0100 Subject: [PATCH] irc: force host to NULL after free --- src/plugins/irc/irc-protocol.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 3238bdbb4..cea5d6b6b 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -4271,7 +4271,10 @@ IRC_PROTOCOL_CALLBACK(354) if (ptr_nick) { if (ptr_nick->host) + { free (ptr_nick->host); + ptr_nick->host = NULL; + } length = strlen (argv[4]) + 1 + strlen (argv[5]) + 1; ptr_nick->host = malloc (length); if (ptr_nick->host)