aboutsummaryrefslogtreecommitdiffstats
path: root/fetchmail.c
diff options
context:
space:
mode:
authorMatthias Andree <matthias.andree@gmx.de>2010-04-12 09:52:19 +0200
committerMatthias Andree <matthias.andree@gmx.de>2010-04-13 00:59:06 +0200
commitb0280c634f4bcde8b99cb7ca9dfc95b89f0a4288 (patch)
tree2fea98af00b6a48984b2a069769d1d214ceb7512 /fetchmail.c
parent24747c1afe7c3c2df648eba7f6964d987460acbd (diff)
downloadfetchmail-b0280c634f4bcde8b99cb7ca9dfc95b89f0a4288.tar.gz
fetchmail-b0280c634f4bcde8b99cb7ca9dfc95b89f0a4288.tar.bz2
fetchmail-b0280c634f4bcde8b99cb7ca9dfc95b89f0a4288.zip
Semi-plug memory leak when using default rcfile entry.
Does not free all members of struct query, but just servername and the query node itself. Add a FIXME note.
Diffstat (limited to 'fetchmail.c')
-rw-r--r--fetchmail.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c
index 4e0ea519..af2a5dda 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -1094,12 +1094,18 @@ static int load_params(int argc, char **argv, int optind)
/*
* If there's a defaults record, merge it and lose it.
+ * FIXME: we don't currently free all entries that might be in struct query.
*/
if (querylist && strcmp(querylist->server.pollname, "defaults") == 0)
{
+ struct query *tmpq;
+
for (ctl = querylist->next; ctl; ctl = ctl->next)
optmerge(ctl, querylist, FALSE);
+ tmpq = querylist;
querylist = querylist->next;
+ free(tmpq->server.pollname);
+ free(tmpq);
}
/* don't allow a defaults record after the first */