From 5fe30d0f35be7a77e8ae4b1550ca07a31f8b6f4e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 11 Mar 2006 02:29:23 +0000 Subject: r14192: Don't forget to correctly initialize pipe_hnd. Coverity fix #34. Jeremy. (This used to be commit 6b3dc96dcf9b14177abfd3c901bfb0baad8afa76) --- source3/libmsrpc/cac_lsarpc.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source3/libmsrpc/cac_lsarpc.c') diff --git a/source3/libmsrpc/cac_lsarpc.c b/source3/libmsrpc/cac_lsarpc.c index d8b92b9dbf..1877e9cd7e 100644 --- a/source3/libmsrpc/cac_lsarpc.c +++ b/source3/libmsrpc/cac_lsarpc.c @@ -59,6 +59,12 @@ int cac_LsaOpenPolicy(CacServerHandle *hnd, TALLOC_CTX *mem_ctx, struct LsaOpenP hnd->_internal.pipes[PI_LSARPC] = True; } + pipe_hnd = cac_GetPipe(hnd, PI_LSARPC); + if(!pipe_hnd) { + hnd->status = NT_STATUS_INVALID_HANDLE; + return CAC_FAILURE; + } + policy = SMB_MALLOC_P(POLICY_HND); if(!policy) { errno = ENOMEM; -- cgit