summaryrefslogtreecommitdiff
path: root/source3/smbd/server.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/server.c')
-rw-r--r--source3/smbd/server.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/smbd/server.c b/source3/smbd/server.c
index 5f6783e05c..075e44d319 100644
--- a/source3/smbd/server.c
+++ b/source3/smbd/server.c
@@ -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(