From 15603e1c2fa110970f2a9866abe7692b84d58707 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 Mar 2006 00:08:39 +0000 Subject: r14261: Fix coverity #38. No null deref. Jeremy. (This used to be commit 2a2b966b7b92ac340d61ba157d207a42509a93d1) --- source3/libmsrpc/cac_winreg.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/libmsrpc') 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; -- cgit