aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2016-09-29 05:20:23 -0400
committerSteve French <smfrench@gmail.com>2016-10-13 20:48:20 -0400
commit24df1483c272c99ed88b0cba135d0e1dfdee3930 (patch)
tree677087777da44604a22e30cb915e837b6fc1fe5c
parent834170c85978b0e85805364f623393968f7a9b5e (diff)
Cleanup missing frees on some ioctls
Cleanup some missing mem frees on some cifs ioctls, and clarify others to make more obvious that no data is returned. CC: Stable <stable@vger.kernel.org> Signed-off-by: Steve French <smfrench@gmail.com> Acked-by: Sachin Prabhu <sprabhu@redhat.com>
-rw-r--r--fs/cifs/smb2ops.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c
index f0872d2abc6f..5d456ebb3813 100644
--- a/fs/cifs/smb2ops.c
+++ b/fs/cifs/smb2ops.c
@@ -292,7 +292,7 @@ SMB3_request_interfaces(const unsigned int xid, struct cifs_tcon *tcon)
292 cifs_dbg(FYI, "Link Speed %lld\n", 292 cifs_dbg(FYI, "Link Speed %lld\n",
293 le64_to_cpu(out_buf->LinkSpeed)); 293 le64_to_cpu(out_buf->LinkSpeed));
294 } 294 }
295 295 kfree(out_buf);
296 return rc; 296 return rc;
297} 297}
298#endif /* STATS2 */ 298#endif /* STATS2 */
@@ -705,6 +705,7 @@ smb2_clone_range(const unsigned int xid,
705 705
706cchunk_out: 706cchunk_out:
707 kfree(pcchunk); 707 kfree(pcchunk);
708 kfree(retbuf);
708 return rc; 709 return rc;
709} 710}
710 711
@@ -829,7 +830,6 @@ smb2_duplicate_extents(const unsigned int xid,
829{ 830{
830 int rc; 831 int rc;
831 unsigned int ret_data_len; 832 unsigned int ret_data_len;
832 char *retbuf = NULL;
833 struct duplicate_extents_to_file dup_ext_buf; 833 struct duplicate_extents_to_file dup_ext_buf;
834 struct cifs_tcon *tcon = tlink_tcon(trgtfile->tlink); 834 struct cifs_tcon *tcon = tlink_tcon(trgtfile->tlink);
835 835
@@ -855,7 +855,7 @@ smb2_duplicate_extents(const unsigned int xid,
855 FSCTL_DUPLICATE_EXTENTS_TO_FILE, 855 FSCTL_DUPLICATE_EXTENTS_TO_FILE,
856 true /* is_fsctl */, (char *)&dup_ext_buf, 856 true /* is_fsctl */, (char *)&dup_ext_buf,
857 sizeof(struct duplicate_extents_to_file), 857 sizeof(struct duplicate_extents_to_file),
858 (char **)&retbuf, 858 NULL,
859 &ret_data_len); 859 &ret_data_len);
860 860
861 if (ret_data_len > 0) 861 if (ret_data_len > 0)
@@ -878,7 +878,6 @@ smb3_set_integrity(const unsigned int xid, struct cifs_tcon *tcon,
878 struct cifsFileInfo *cfile) 878 struct cifsFileInfo *cfile)
879{ 879{
880 struct fsctl_set_integrity_information_req integr_info; 880 struct fsctl_set_integrity_information_req integr_info;
881 char *retbuf = NULL;
882 unsigned int ret_data_len; 881 unsigned int ret_data_len;
883 882
884 integr_info.ChecksumAlgorithm = cpu_to_le16(CHECKSUM_TYPE_UNCHANGED); 883 integr_info.ChecksumAlgorithm = cpu_to_le16(CHECKSUM_TYPE_UNCHANGED);
@@ -890,7 +889,7 @@ smb3_set_integrity(const unsigned int xid, struct cifs_tcon *tcon,
890 FSCTL_SET_INTEGRITY_INFORMATION, 889 FSCTL_SET_INTEGRITY_INFORMATION,
891 true /* is_fsctl */, (char *)&integr_info, 890 true /* is_fsctl */, (char *)&integr_info,
892 sizeof(struct fsctl_set_integrity_information_req), 891 sizeof(struct fsctl_set_integrity_information_req),
893 (char **)&retbuf, 892 NULL,
894 &ret_data_len); 893 &ret_data_len);
895 894
896} 895}