From e1811a6ef489584145ebbe520500feb881b79f7d Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Sun, 31 Jul 2005 00:41:39 +0000 Subject: Plug memory leaks. svn path=/trunk/; revision=4197 --- driver.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'driver.c') diff --git a/driver.c b/driver.c index 56fc93f1..9d624b81 100644 --- a/driver.c +++ b/driver.c @@ -1007,6 +1007,7 @@ static int do_session( goto closeUp; } + xfree(ctl->server.truename); ctl->server.truename = xstrdup(leadname); } else @@ -1033,9 +1034,11 @@ static int do_session( } else { + xfree(ctl->server.truename); ctl->server.truename=xstrdup(res->ai_canonname); ctl->server.trueaddr=xmalloc(res->ai_addrlen); memcpy(ctl->server.trueaddr, res->ai_addr, res->ai_addrlen); + freeaddrinfo(res); } #else struct hostent *namerec; -- cgit v1.2.3