[PATCH] Fix ms leaks when object not found, deleted.

Jeff Darcy jdarcy at redhat.com
Tue Sep 28 18:32:36 UTC 2010


>From 1f3efa67fb6142bd36d289db993fccda85035d12 Mon Sep 17 00:00:00 2001
From: Jeff Darcy <jdarcy at redhat.com>
Date: Tue, 28 Sep 2010 14:30:00 -0400
Subject: [PATCH] Fix ms leaks when object not found, deleted.

---
 rest.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/rest.c b/rest.c
index a2fffc3..66f91bb 100644
--- a/rest.c
+++ b/rest.c
@@ -304,6 +304,7 @@ proxy_get_data (void *cctx, struct MHD_Connection
*conn, const char *url,
 				MHD_NO,MHD_NO);
 			MHD_queue_response(conn,MHD_HTTP_NOT_FOUND,resp);
 			MHD_destroy_response(resp);
+			free_ms(ms);
 			return MHD_YES;
 		}
 		DPRINTF("  will fetch from %s:%u\n", master_host,master_port);
@@ -904,6 +905,7 @@ proxy_delete (void *cctx, struct MHD_Connection
*conn, const char *url,
 	MHD_destroy_response(resp);

 	replicate_delete((char *)url);
+	free_ms(ms);
 	return MHD_YES;
 }

-- 
1.6.2.5



More information about the iwhd-devel mailing list