]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
Cleanup missing frees on some ioctls
authorSteve French <smfrench@gmail.com>
Thu, 29 Sep 2016 09:20:23 +0000 (04:20 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Thu, 23 Feb 2017 03:54:13 +0000 (03:54 +0000)
commit 24df1483c272c99ed88b0cba135d0e1dfdee3930 upstream.

Cleanup some missing mem frees on some cifs ioctls, and
clarify others to make more obvious that no data is returned.

Signed-off-by: Steve French <smfrench@gmail.com>
Acked-by: Sachin Prabhu <sprabhu@redhat.com>
[bwh: Backported to 3.16:
 - Drop changes to smb2_duplicate_extents(), smb3_set_integrity()
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
fs/cifs/smb2ops.c

index 394977d5466288e39d75b1bd62a628618ef2e929..6cfc4ea3f3a1f4049f05f53ce96142d402df22e2 100644 (file)
@@ -228,7 +228,7 @@ SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon)
                        le64_to_cpu(out_buf->LinkSpeed));
        } else
                cifs_dbg(VFS, "error %d on ioctl to get interface list\n", rc);
-
+       kfree(out_buf);
        return rc;
 }
 #endif /* STATS2 */
@@ -640,6 +640,7 @@ smb2_clone_range(const unsigned int xid,
 
 cchunk_out:
        kfree(pcchunk);
+       kfree(retbuf);
        return rc;
 }