From: michael Date: Tue, 23 Dec 2014 18:51:47 +0000 (+0000) Subject: - scan.c:scan_manual(): fixed memory leak X-Git-Tag: 1.0.0beta1~49 X-Git-Url: http://git.serene-ircd.net/?a=commitdiff_plain;h=b92437fc5623ec64355924bcfff37f75e58ac972;p=hopm.git - scan.c:scan_manual(): fixed memory leak git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5089 82007160-df01-0410-b94d-b575c5fd34c7 --- diff --git a/src/scan.c b/src/scan.c index aa7ba88..eae8c88 100644 --- a/src/scan.c +++ b/src/scan.c @@ -1008,8 +1008,6 @@ void scan_manual(char *param, struct ChannelConf *target) scannername++; } - ss = MyMalloc(sizeof *ss); - /* If IP is a hostname, resolve it using gethostbyname (which will block!) */ if (!(addr = firedns_resolveip4(ip))) { @@ -1021,6 +1019,8 @@ void scan_manual(char *param, struct ChannelConf *target) /* IP = the resolved IP now (it was the ip OR hostname before) */ ip = inet_ntoa(*addr); + ss = MyMalloc(sizeof *ss); + /* These don't exist in a manual scan */ ss->irc_nick = NULL; ss->irc_username = NULL;