Skip to content

Commit 9df0f70

Browse files
author
Marios Makassikis
committed
ksmbd: smb1: Fix potential memleak in smb_nt_create_andx
If the filename is invalid or in the veto list, the smb_get_name() call will fail. Make sure the previously allocated 'name' is released. Signed-off-by: Marios Makassikis <[email protected]>
1 parent 9018350 commit 9df0f70

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

smb1pdu.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2291,6 +2291,7 @@ int smb_nt_create_andx(struct ksmbd_work *work)
22912291
if (IS_ERR(conv_name)) {
22922292
rsp->hdr.Status.CifsError =
22932293
STATUS_OBJECT_NAME_INVALID;
2294+
kfree(name);
22942295
return PTR_ERR(conv_name);
22952296
}
22962297

0 commit comments

Comments
 (0)