# HG changeset patch # User Richard Mortimer # Date 1295981979 0 # Node ID a1286c17824a26d1587e140924bcd75f1ce33775 # Parent aafff5605a1a5eec0224d2c31c15cc2b944b718c Ensure that address and bouncedata are freed in unsub_bouncers() diff -r aafff5605a1a -r a1286c17824a src/mlmmj-maintd.c --- 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; }