diff options
-rw-r--r-- | source4/smbd/service_task.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source4/smbd/service_task.c b/source4/smbd/service_task.c index 8edd49e259..1eb8403e3b 100644 --- a/source4/smbd/service_task.c +++ b/source4/smbd/service_task.c @@ -40,9 +40,10 @@ void task_server_terminate(struct task_server *task, const char *reason, bool fa irpc_handle = irpc_binding_handle_by_name(task, task->msg_ctx, "samba", &ndr_table_irpc); - - r.in.reason = reason; - dcerpc_samba_terminate_r(irpc_handle, task, &r); + if (irpc_handle != NULL) { + r.in.reason = reason; + dcerpc_samba_terminate_r(irpc_handle, task, &r); + } } model_ops->terminate(event_ctx, task->lp_ctx, reason); |