Unverified Commit 1887a606 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!13120 smb: client: fix possible double free in smb2_set_ea()

parents 42f14677 30ce55b1
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1122,7 +1122,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
	struct cifs_fid fid;
	unsigned int size[1];
	void *data[1];
	struct smb2_file_full_ea_info *ea = NULL;
	struct smb2_file_full_ea_info *ea;
	struct smb2_query_info_rsp *rsp;
	int rc, used_len = 0;
	int retries = 0, cur_sleep = 1;
@@ -1143,6 +1143,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
	if (!utf16_path)
		return -ENOMEM;

	ea = NULL;
	resp_buftype[0] = resp_buftype[1] = resp_buftype[2] = CIFS_NO_BUFFER;
	vars = kzalloc(sizeof(*vars), GFP_KERNEL);
	if (!vars) {