winbindd: Free is_parent before we terminate
authorAndreas Schneider <asn@samba.org>
Fri, 9 Feb 2018 14:33:39 +0000 (15:33 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 12 Feb 2018 18:52:48 +0000 (19:52 +0100)
This makes valgrind happy.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
source3/winbindd/winbindd.c

index 0a8d146dfdc76ecf26c3c6d850a853a3abf84b1e..6e3df1f18a8ecaedb041270ce64452a887e04afe 100644 (file)
@@ -233,11 +233,14 @@ static void winbindd_sig_term_handler(struct tevent_context *ev,
                                      void *siginfo,
                                      void *private_data)
 {
-       bool *is_parent = talloc_get_type_abort(private_data, bool);
+       bool *p = talloc_get_type_abort(private_data, bool);
+       bool is_parent = *p;
+
+       TALLOC_FREE(p);
 
        DEBUG(0,("Got sig[%d] terminate (is_parent=%d)\n",
-                signum, (int)*is_parent));
-       terminate(*is_parent);
+                signum, is_parent));
+       terminate(is_parent);
 }
 
 /*