summaryrefslogtreecommitdiff
path: root/source4/smbd
diff options
context:
space:
mode:
Diffstat (limited to 'source4/smbd')
-rw-r--r--source4/smbd/process_standard.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/smbd/process_standard.c b/source4/smbd/process_standard.c
index dfa4fa6b1c..032b999d4e 100644
--- a/source4/smbd/process_standard.c
+++ b/source4/smbd/process_standard.c
@@ -120,7 +120,9 @@ static void standard_accept_connection(struct tevent_context *ev,
/* this will free all the listening sockets and all state that
is not associated with this new connection */
talloc_free(sock);
- talloc_free(ev);
+ if (tevent_re_initialise(ev) != 0) {
+ smb_panic("Failed to re-initialise tevent after fork");
+ }
/* we don't care if the dup fails, as its only a select()
speed optimisation */
@@ -192,7 +194,9 @@ static void standard_new_task(struct tevent_context *ev,
/* this will free all the listening sockets and all state that
is not associated with this new connection */
- talloc_free(ev);
+ if (tevent_re_initialise(ev) != 0) {
+ smb_panic("Failed to re-initialise tevent after fork");
+ }
/* ldb/tdb need special fork handling */
ldb_wrap_fork_hook();