]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Fix fetch_share_mode_send() error return
authorVolker Lendecke <vl@samba.org>
Fri, 18 Dec 2020 12:04:47 +0000 (13:04 +0100)
committerJeremy Allison <jra@samba.org>
Fri, 6 Aug 2021 17:22:30 +0000 (17:22 +0000)
The "return" is unnecessary here, but in case the code changes later
on, it won't be forgotten. Also, we need to tell the callers that we
found an invalid record.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/locking/share_mode_lock.c

index 7a091637c74f739000b77a00f51f0ac755940047..b7386f0352684a7d2efed7a21bbf7d458ade41fa 100644 (file)
@@ -1496,7 +1496,9 @@ static void fetch_share_mode_fn(
                ltdb.share_mode_data_len);
        if (state->lck->data == NULL) {
                DBG_DEBUG("parse_share_modes failed\n");
+               state->status = NT_STATUS_INTERNAL_DB_CORRUPTION;
                TALLOC_FREE(state->lck);
+               return;
        }
 }