Fix a valgrind error
authorVolker Lendecke <vl@samba.org>
Sat, 14 Feb 2009 07:07:29 +0000 (08:07 +0100)
committerVolker Lendecke <vl@samba.org>
Sat, 14 Feb 2009 07:05:26 +0000 (08:05 +0100)
source3/smbd/server.c

index 5f6783e05c125252741e4301566a4d5c5684ef6d..075e44d319827a0c116fec291fe848f216dc6c9d 100644 (file)
@@ -367,7 +367,11 @@ static void smbd_accept_connection(struct tevent_context *ev,
                   descriptors */
                close_low_fds(False);
 
-               TALLOC_FREE(s->parent);
+               /*
+                * Can't use TALLOC_FREE here. Nulling out the argument to it
+                * would overwrite memory we've just freed.
+                */
+               talloc_free(s->parent);
                s = NULL;
 
                if (!reinit_after_fork(