[PATCH] messaging: Fix a memleak with clustering

Volker Lendecke Volker.Lendecke at SerNet.DE
Wed Jan 8 02:39:10 MST 2014


Hi!

Please review & push!

Thanks,

Volker

-- 
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.sernet.de, mailto:kontakt at sernet.de
-------------- next part --------------
From 4d70c1525982294dc557e5f731d774501ddf5771 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Wed, 8 Jan 2014 09:32:37 +0000
Subject: [PATCH] messaging: Fix a memleak with clustering

We have to properly throw away unexpected messages that came in via ctdb

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/lib/msg_channel.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/source3/lib/msg_channel.c b/source3/lib/msg_channel.c
index 8e23fd4..6be5e2e 100644
--- a/source3/lib/msg_channel.c
+++ b/source3/lib/msg_channel.c
@@ -310,6 +310,9 @@ static void msg_read_got_ctdb(struct tevent_req *subreq)
 	/*
 	 * Got some unexpected msg type, wait for the next one
 	 */
+
+	TALLOC_FREE(state->rec);
+
 	subreq = ctdb_msg_read_send(state, state->ev,
 				    state->channel->ctdb_channel);
 	if (tevent_req_nomem(subreq, req)) {
-- 
1.7.9.5



More information about the samba-technical mailing list