smbXsrv_open.c: Initialize local variable.
authorChristopher R. Hertel (crh) <crh@samba.org>
Wed, 12 Feb 2014 20:08:12 +0000 (14:08 -0600)
committerMichael Adam <obnox@samba.org>
Wed, 12 Feb 2014 22:57:05 +0000 (23:57 +0100)
Coverity fix.  Initialize status to NT_STATUS_OK.  Otherwise, there are
code paths that would cause the smbXsrv_open_cleanup() function to
return an uninitialized value.

Cov: 1168008

Signed-off-by: Christopher R. Hertel (crh) <crh@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Wed Feb 12 23:57:05 CET 2014 on sn-devel-104

source3/smbd/smbXsrv_open.c

index 7e6b54fc0858d024c3860da64b5f42b0cfe13184..b15be287691b49bab76df436278554e826f8eb90 100644 (file)
@@ -1384,7 +1384,7 @@ NTSTATUS smbXsrv_open_global_traverse(
 
 NTSTATUS smbXsrv_open_cleanup(uint64_t persistent_id)
 {
-       NTSTATUS status;
+       NTSTATUS status = NT_STATUS_OK;
        TALLOC_CTX *frame = talloc_stackframe();
        struct smbXsrv_open_global0 *op = NULL;
        uint8_t key_buf[SMBXSRV_OPEN_GLOBAL_TDB_KEY_SIZE];