ksmbd: fix uninitialized symbol 'pntsd_size'
No check for if "rc" is an error code for build_sec_desc().
This can cause problems with using uninitialized pntsd_size.
Fixes: e2f34481b2
("cifsd: add server-side procedures for SMB3")
Cc: stable@vger.kernel.org # v5.15
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
This commit is contained in:
parent
ef399469d9
commit
f2e78affc4
|
@ -2962,6 +2962,10 @@ int smb2_open(struct ksmbd_work *work)
|
||||||
&pntsd_size, &fattr);
|
&pntsd_size, &fattr);
|
||||||
posix_acl_release(fattr.cf_acls);
|
posix_acl_release(fattr.cf_acls);
|
||||||
posix_acl_release(fattr.cf_dacls);
|
posix_acl_release(fattr.cf_dacls);
|
||||||
|
if (rc) {
|
||||||
|
kfree(pntsd);
|
||||||
|
goto err_out;
|
||||||
|
}
|
||||||
|
|
||||||
rc = ksmbd_vfs_set_sd_xattr(conn,
|
rc = ksmbd_vfs_set_sd_xattr(conn,
|
||||||
user_ns,
|
user_ns,
|
||||||
|
|
Loading…
Reference in New Issue