summaryrefslogtreecommitdiff
path: root/source4/smbd/service_task.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-07-19 03:57:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:01:11 -0500
commit3c097f3afb51f41abe2be6a5698dabba559b75fc (patch)
tree3823706e0c3eca71839c62317fbffed3a8dded8d /source4/smbd/service_task.c
parent0d80514173fad381a5ccd9d52cbc7b735bfd2d35 (diff)
downloadsamba-3c097f3afb51f41abe2be6a5698dabba559b75fc.tar.gz
samba-3c097f3afb51f41abe2be6a5698dabba559b75fc.tar.bz2
samba-3c097f3afb51f41abe2be6a5698dabba559b75fc.zip
r23960: Don't destory the 'reason' for terminating the service before printing it.
Andrew Bartlett (This used to be commit 18d2680f357cef68e0e9714ce5404be70759d2ad)
Diffstat (limited to 'source4/smbd/service_task.c')
-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 */