aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--fetchmail.c6
2 files changed, 9 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 44df8aca..cd8d367f 100644
--- a/NEWS
+++ b/NEWS
@@ -54,6 +54,9 @@ removed from a 6.4.0 or newer release.)
fetchmail-6.3.17 (not yet released):
+# BUG FIX
+* Plug memory leak when using a "defaults" entry in the run control file.
+
# REGRESSION FIX
* Fix string handling in rcfile scanner, which caused fetchmail to misparse a
run control file in certain circumstances. Fixes BerliOS bug #14257.
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 */