Mercurial > hg > mlmmj
changeset 824:a1286c17824a
Ensure that address and bouncedata are freed in unsub_bouncers()
author | Richard Mortimer |
---|---|
date | Tue, 25 Jan 2011 18:59:39 +0000 |
parents | aafff5605a1a |
children | ed44b298ebfc |
files | src/mlmmj-maintd.c |
diffstat | 1 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/mlmmj-maintd.c Tue Jan 25 18:33:14 2011 +0000 +++ b/src/mlmmj-maintd.c Tue Jan 25 18:59:39 2011 +0000 @@ -731,6 +731,7 @@ a = strchr(firstbounce, ':'); if(a == NULL) { myfree(firstbounce); + myfree(bouncedata); continue; } @@ -738,14 +739,17 @@ bouncetime = (time_t)strtol(a, NULL, 10); myfree(firstbounce); t = time(NULL); - if(t - bouncetime < bouncelife + WAITPROBE) + if(t - bouncetime < bouncelife + WAITPROBE) { + myfree(bouncedata); continue; /* ok, don't unsub this one */ + } /* Ok, go ahead and unsubscribe the address */ address = mystrdup(dp->d_name); a = strchr(address, '='); if(a == NULL) { /* skip malformed */ myfree(address); + myfree(bouncedata); continue; } *a = '@'; @@ -754,6 +758,8 @@ if(childpid < 0) { log_error(LOG_ARGS, "Could not fork"); + myfree(address); + myfree(bouncedata); continue; }