All of lore.kernel.org
 help / color / mirror / Atom feed
* [mlmmj] [PATCH 08 of 10] Ensure that address and bouncedata are freed in
@ 2011-01-27 22:59 Richard Mortimer
  0 siblings, 0 replies; only message in thread
From: Richard Mortimer @ 2011-01-27 22:59 UTC (permalink / raw)
  To: mlmmj

# HG changeset patch
# User Richard Mortimer <richm@oldelvet.org.uk>
# Date 1295981979 0
# Node ID 4be2135bfd08219a8a84adb4ecd38ca6fe46a14e
# Parent  a1ae4cff691cd9f5f652d5a04d32ce2517e6de80
Ensure that address and bouncedata are freed in unsub_bouncers()

diff -r a1ae4cff691c -r 4be2135bfd08 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
@@ -745,6 +745,7 @@
 		a = strchr(firstbounce, ':');
 		if(a = NULL) {
 			myfree(firstbounce);
+			myfree(bouncedata);
 			continue;
 		}
 
@@ -752,14 +753,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 = '@';
@@ -768,6 +772,8 @@
 		
 		if(childpid < 0) {
 			log_error(LOG_ARGS, "Could not fork");
+			myfree(address);
+			myfree(bouncedata);
 			continue;
 		}
 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-27 22:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 22:59 [mlmmj] [PATCH 08 of 10] Ensure that address and bouncedata are freed in Richard Mortimer

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.