summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2011-05-25 17:26:28 +0200
committerAndreas Schneider <asn@samba.org>2011-06-01 12:02:15 +0200
commite744222e41b7c4c9b197641d3c5c87b27daf5ce8 (patch)
treec8b9a3d73f0c7cc10d5fac0bf59d0d1207ce71e2
parent438b24a77f5173d9ffee76009589033ece6e9dce (diff)
downloadsamba-e744222e41b7c4c9b197641d3c5c87b27daf5ce8.tar.gz
samba-e744222e41b7c4c9b197641d3c5c87b27daf5ce8.tar.bz2
samba-e744222e41b7c4c9b197641d3c5c87b27daf5ce8.zip
s3-rpc_server: Don't segfault if there are not handles to free.
-rw-r--r--source3/rpc_server/rpc_handles.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/rpc_server/rpc_handles.c b/source3/rpc_server/rpc_handles.c
index 32e98f3644..1d78af8170 100644
--- a/source3/rpc_server/rpc_handles.c
+++ b/source3/rpc_server/rpc_handles.c
@@ -307,6 +307,10 @@ bool close_policy_hnd(struct pipes_struct *p, struct policy_handle *hnd)
void close_policy_by_pipe(struct pipes_struct *p)
{
+ if (p->pipe_handles == NULL) {
+ return;
+ }
+
p->pipe_handles->pipe_ref_count--;
if (p->pipe_handles->pipe_ref_count == 0) {