summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/smbd/service_task.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c
index fbe119e3fe..cab5c7e112 100644
--- a/source4/smbd/service_task.c
+++ b/source4/smbd/service_task.c
@@ -34,8 +34,10 @@ void task_server_terminate(struct task_server *task, const char *reason)
struct event_context *event_ctx = task->event_ctx;
const struct model_ops *model_ops = task->model_ops;
DEBUG(0,("task_server_terminate: [%s]\n", reason));
- talloc_free(task);
model_ops->terminate(event_ctx, reason);
+
+ /* don't free this above, it might contain the 'reason' being printed */
+ talloc_free(task);
}
/* used for the callback from the process model code */