xconn was getting dereference outside NULL check block, causing
'Dereference after null check' issue.
Fix moves offeding initialisation in NULL check blog.
Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Noel Power <noel.power@suse.com>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Thu Jun 12 16:49:02 UTC 2025 on atb-devel-224
if (NT_STATUS_IS_OK(status)) {
req->conn = tcon->compat;
}
- }
#if defined(WITH_SMB1SERVER)
- req->posix_pathnames = (xconn->smb1.unix_info.client_cap_low &
- CIFS_UNIX_POSIX_PATHNAMES_CAP) != 0;
+ req->posix_pathnames = (xconn->smb1.unix_info.client_cap_low &
+ CIFS_UNIX_POSIX_PATHNAMES_CAP) != 0;
#endif
+ }
/* Ensure we have at least wct words and 2 bytes of bcc. */
if (smb_size + req->wct*2 > req_size) {