summaryrefslogtreecommitdiff
path: root/source3/libmsrpc
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-13 00:08:39 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:15:21 -0500
commit15603e1c2fa110970f2a9866abe7692b84d58707 (patch)
treedba76eaeb6ce842011d0ccfb46a24b56b2c5da9d /source3/libmsrpc
parent1ab0d76f02cd0bc112b4dd026dad5223c9fed3b5 (diff)
downloadsamba-15603e1c2fa110970f2a9866abe7692b84d58707.tar.gz
samba-15603e1c2fa110970f2a9866abe7692b84d58707.tar.bz2
samba-15603e1c2fa110970f2a9866abe7692b84d58707.zip
r14261: Fix coverity #38. No null deref.
Jeremy. (This used to be commit 2a2b966b7b92ac340d61ba157d207a42509a93d1)
Diffstat (limited to 'source3/libmsrpc')
-rw-r--r--source3/libmsrpc/cac_winreg.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/libmsrpc/cac_winreg.c b/source3/libmsrpc/cac_winreg.c
index 590dce210e..8c9f06a59b 100644
--- a/source3/libmsrpc/cac_winreg.c
+++ b/source3/libmsrpc/cac_winreg.c
@@ -960,6 +960,12 @@ int cac_Shutdown(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct Shutdown *op)
hnd->_internal.pipes[PI_SHUTDOWN] = True;
}
+ pipe_hnd = cac_GetPipe(hnd, PI_SHUTDOWN);
+ if(!pipe_hnd) {
+ hnd->status = NT_STATUS_INVALID_HANDLE;
+ return CAC_FAILURE;
+ }
+
msg = (op->in.message != NULL) ? op->in.message : talloc_strdup(mem_ctx, "");
hnd->status = NT_STATUS_OK;