From: Joseph Sutton Date: Fri, 6 Oct 2023 02:46:34 +0000 (+1300) Subject: smb2_server: Check status codes (CID 1474441) X-Git-Tag: tevent-0.16.0~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7eaad46f8c34498eb2d59c985f202a9cf92b1a73;p=thirdparty%2Fsamba.git smb2_server: Check status codes (CID 1474441) Signed-off-by: Joseph Sutton Reviewed-by: Andrew Bartlett --- diff --git a/source3/smbd/smb2_server.c b/source3/smbd/smb2_server.c index 034370ffcfd..67e271db041 100644 --- a/source3/smbd/smb2_server.c +++ b/source3/smbd/smb2_server.c @@ -516,11 +516,11 @@ static NTSTATUS smbd_smb2_inbuf_parse_compound(struct smbXsrv_connection *xconn, status = smb2srv_session_lookup_conn(xconn, uid, now, &s); - if (s == NULL) { + if (!NT_STATUS_IS_OK(status)) { status = smb2srv_session_lookup_global(xconn->client, uid, req, &s); } - if (s == NULL) { + if (!NT_STATUS_IS_OK(status)) { DEBUG(1, ("invalid session[%llu] in " "SMB2_TRANSFORM header\n", (unsigned long long)uid));