Commit 783bf7b8 authored by Chuhong Yuan's avatar Chuhong Yuan Committed by Steve French
Browse files

cifs: Fix missed free operations



cifs_setattr_nounix has two paths which miss free operations
for xid and fullpath.
Use goto cifs_setattr_exit like other paths to fix them.

CC: Stable <stable@vger.kernel.org>
Fixes: aa081859 ("cifs: flush before set-info if we have writeable handles")
Signed-off-by: default avatarChuhong Yuan <hslester96@gmail.com>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
Reviewed-by: default avatarPavel Shilovsky <pshilov@microsoft.com>
parent 03d9a9fe
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2475,9 +2475,9 @@ cifs_setattr_nounix(struct dentry *direntry, struct iattr *attrs)
			rc = tcon->ses->server->ops->flush(xid, tcon, &wfile->fid);
			cifsFileInfo_put(wfile);
			if (rc)
				return rc;
				goto cifs_setattr_exit;
		} else if (rc != -EBADF)
			return rc;
			goto cifs_setattr_exit;
		else
			rc = 0;
	}