From: Andreas Schneider Date: Tue, 24 Nov 2020 15:57:12 +0000 (+0100) Subject: s3:smbd: Fix a possible null pointer deref in oplock code X-Git-Tag: samba-4.14.0rc1~570 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=17a72ab531e6fde04132448b2b7259aca33d3456;p=thirdparty%2Fsamba.git s3:smbd: Fix a possible null pointer deref in oplock code Found by cppcheck. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/oplock.c b/source3/smbd/oplock.c index b6ac60fa4e1..d4062f7a66c 100644 --- a/source3/smbd/oplock.c +++ b/source3/smbd/oplock.c @@ -433,12 +433,11 @@ static void downgrade_lease_additional_trigger(struct tevent_context *ev, &state->lease_key, state->break_from, state->break_to); - TALLOC_FREE(state); if (!NT_STATUS_IS_OK(status)) { smbd_server_disconnect_client(state->client, nt_errstr(status)); - return; } + TALLOC_FREE(state); } struct fsps_lease_update_state {