summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-09-15 13:14:42 +1000
committerAndrew Tridgell <tridge@samba.org>2010-09-15 15:39:36 +1000
commitea223baabc599415bf8da14a53cb77632343bc82 (patch)
treed2897ac711d76a70b78bf77df9292e073cf64995 /source4
parentbeb9c6be70bcbd04c087c8352cf480e4f869448f (diff)
downloadsamba-ea223baabc599415bf8da14a53cb77632343bc82.tar.gz
samba-ea223baabc599415bf8da14a53cb77632343bc82.tar.bz2
samba-ea223baabc599415bf8da14a53cb77632343bc82.zip
s4-server: check the return of irpc_binding_handle_by_name
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/smbd/service_task.c7
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);