diff options
Diffstat (limited to 'fs/cifs/cifssmb.c')
-rw-r--r-- | fs/cifs/cifssmb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 8e2e799e7a24..1e7a4fe1f810 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -3742,12 +3742,11 @@ CIFSSMBGetCIFSACL(const unsigned int xid, struct cifs_tcon *tcon, __u16 fid, | |||
3742 | rc = -EINVAL; | 3742 | rc = -EINVAL; |
3743 | *pbuflen = 0; | 3743 | *pbuflen = 0; |
3744 | } else { | 3744 | } else { |
3745 | *acl_inf = kmalloc(*pbuflen, GFP_KERNEL); | 3745 | *acl_inf = kmemdup(pdata, *pbuflen, GFP_KERNEL); |
3746 | if (*acl_inf == NULL) { | 3746 | if (*acl_inf == NULL) { |
3747 | *pbuflen = 0; | 3747 | *pbuflen = 0; |
3748 | rc = -ENOMEM; | 3748 | rc = -ENOMEM; |
3749 | } | 3749 | } |
3750 | memcpy(*acl_inf, pdata, *pbuflen); | ||
3751 | } | 3750 | } |
3752 | } | 3751 | } |
3753 | qsec_out: | 3752 | qsec_out: |