From 8aca76f03540f3df5a81ddab2588c1f8219ac550 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 11 Mar 2006 02:43:25 +0000 Subject: [PATCH] r14194: Coverity bug #35. Fix uninitialized pipe_hnd. 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 4c24671a38d..590dce210ec 100644 --- a/source/libmsrpc/cac_winreg.c +++ b/source/libmsrpc/cac_winreg.c @@ -56,6 +56,12 @@ int cac_RegConnect(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct RegConnect hnd->_internal.pipes[PI_WINREG] = True; } + pipe_hnd = cac_GetPipe(hnd, PI_WINREG); + if(!pipe_hnd) { + hnd->status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } + key = talloc(mem_ctx, POLICY_HND); if(!key) { hnd->status = NT_STATUS_NO_MEMORY;