diff options
-rw-r--r-- | source3/libmsrpc/cac_winreg.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; |