From: Volker Lendecke Date: Fri, 18 Dec 2020 12:04:47 +0000 (+0100) Subject: smbd: Fix fetch_share_mode_send() error return X-Git-Tag: ldb-2.5.0~998 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9e8f7910b299fca75a1fdb11013036d0a34be4be;p=thirdparty%2Fsamba.git smbd: Fix fetch_share_mode_send() error return 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 Reviewed-by: Jeremy Allison --- diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 7a091637c74..b7386f03526 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -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; } }