From 2a2b966b7b92ac340d61ba157d207a42509a93d1 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Mon, 13 Mar 2006 00:08:39 +0000 Subject: [PATCH] r14261: Fix coverity #38. No null deref. Jeremy. --- source/libmsrpc/cac_winreg.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/libmsrpc/cac_winreg.c b/source/libmsrpc/cac_winreg.c index 590dce210ec..8c9f06a59bf 100644 --- a/source/libmsrpc/cac_winreg.c +++ b/source/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; -- 2.11.4.GIT