[PATCH] Fix a valgrind error

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


Hi!

Review appreciated!

Thanks, Volker
-------------- next part --------------
>From fbd412dd431e3ae1e805089a82ff0556d8a925db 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"
---
 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