[PATCH] Fix a valgrind error

Volker Lendecke vl at samba.org
Fri Jun 24 06:24:26 UTC 2016


On Fri, Jun 24, 2016 at 08:22:15AM +0200, Volker Lendecke wrote:
> Review appreciated!

And now with the right tags :-)

Volker
-------------- next part --------------
>From 33cf385ce07fe78b6595adef0fd37900698535f9 Mon Sep 17 00:00:00 2001
From: Volker Lendecke <vl at samba.org>
Date: Fri, 24 Jun 2016 07:27:43 +0200
Subject: [PATCH] smbd: Fix a valgrind error

"child" has been free'd via "tmp"

Signed-off-by: Volker Lendecke <vl at samba.org>
---
 source3/smbd/server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 24acc04..cdcdcc2 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -577,7 +577,7 @@ static void remove_child_pid(struct smbd_parent_context *parent,
 		return;
 	}
 
-	if (child->pid == procid_to_pid(&parent->cleanupd)) {
+	if (pid == procid_to_pid(&parent->cleanupd)) {
 		bool ok;
 
 		DBG_WARNING("Restarting cleanupd\n");
-- 
1.9.1



More information about the samba-technical mailing list