Message ID | 20201010182554.337097-1-vz@mleia.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | cifs: Fix incomplete memory allocation on setxattr path | expand |
Thanks Vladimir
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c index 24f107f763f0..76d82a60a550 100644 --- a/fs/cifs/smb2ops.c +++ b/fs/cifs/smb2ops.c @@ -1216,7 +1216,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, rqst[1].rq_iov = si_iov; rqst[1].rq_nvec = 1; - len = sizeof(ea) + ea_name_len + ea_value_len + 1; + len = sizeof(*ea) + ea_name_len + ea_value_len + 1; ea = kzalloc(len, GFP_KERNEL); if (ea == NULL) { rc = -ENOMEM;