From b92437fc5623ec64355924bcfff37f75e58ac972 Mon Sep 17 00:00:00 2001 From: michael Date: Tue, 23 Dec 2014 18:51:47 +0000 Subject: [PATCH] - scan.c:scan_manual(): fixed memory leak git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5089 82007160-df01-0410-b94d-b575c5fd34c7 --- src/scan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.30.2