From cfa4589662a4e872964148057cce4f2188aeec71 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 11 Mar 2006 02:43:25 +0000 Subject: r14194: Coverity bug #35. Fix uninitialized pipe_hnd. Jeremy. (This used to be commit 8aca76f03540f3df5a81ddab2588c1f8219ac550) --- 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 4c24671a38..590dce210e 100644 --- a/source3/libmsrpc/cac_winreg.c +++ b/source3/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; -- cgit