From 9abf1623ed2384d529ef3a2442a55fb293dee8b0 Mon Sep 17 00:00:00 2001 From: "Christopher R. Hertel (crh)" Date: Wed, 12 Feb 2014 14:08:12 -0600 Subject: [PATCH] smbXsrv_open.c: Initialize local variable. 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) Reviewed-by: Michael Adam Autobuild-User(master): Michael Adam Autobuild-Date(master): Wed Feb 12 23:57:05 CET 2014 on sn-devel-104 --- source3/smbd/smbXsrv_open.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index 7e6b54fc085..b15be287691 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -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]; -- 2.11.4.GIT