smbd: Fix an uninitalized variable
authorVolker Lendecke <vl@samba.org>
Tue, 8 Oct 2019 15:37:56 +0000 (17:37 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 10 Oct 2019 01:04:33 +0000 (01:04 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct 10 01:04:33 UTC 2019 on sn-devel-184

source3/locking/share_mode_lock.c

index aeb9fd4b18b3fec6e682aaf2ed5e3df48bc1cdf1..92289404468ac3031cc0c09b0c9d51076d90d36a 100644 (file)
@@ -1766,7 +1766,6 @@ static void share_mode_entry_do_fn(struct db_record *rec, void *private_data)
        struct share_mode_entry_buf buf;
        TDB_DATA dbufs[3];
        size_t num_dbufs = 0;
-       NTSTATUS status;
 
        if ((data.dsize % SHARE_MODE_ENTRY_SIZE) != 0) {
                DBG_WARNING("Invalid data size %zu\n", data.dsize);
@@ -1838,7 +1837,7 @@ static void share_mode_entry_do_fn(struct db_record *rec, void *private_data)
        state->status = dbwrap_record_storev(rec, dbufs, num_dbufs, 0);
        if (!NT_STATUS_IS_OK(state->status)) {
                DBG_DEBUG("dbwrap_record_storev failed: %s\n",
-                         nt_errstr(status));
+                         nt_errstr(state->status));
                return;
        }
 }