diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2005-07-31 00:41:39 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2005-07-31 00:41:39 +0000 |
commit | e1811a6ef489584145ebbe520500feb881b79f7d (patch) | |
tree | ad40eeec1e23dcfdfd5a4b9f9a48da17fae10f41 | |
parent | fbc9704aebaef278029a3ee01720ad0b835e5b56 (diff) | |
download | fetchmail-e1811a6ef489584145ebbe520500feb881b79f7d.tar.gz fetchmail-e1811a6ef489584145ebbe520500feb881b79f7d.tar.bz2 fetchmail-e1811a6ef489584145ebbe520500feb881b79f7d.zip |
Plug memory leaks.
svn path=/trunk/; revision=4197
-rw-r--r-- | driver.c | 3 | ||||
-rw-r--r-- | options.c | 1 |
2 files changed, 4 insertions, 0 deletions
@@ -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; @@ -322,6 +322,7 @@ struct query *ctl; /* option record to be initialized */ break; case 'f': case LA_RCFILE: + xfree(rcfile); rcfile = prependdir (optarg, currentwd); break; case 'i': |