Commit 21ec6ffa authored by Alan Cox's avatar Alan Cox Committed by Sage Weil

ceph: fix potential double free

We re-run the loop but we don't re-set the attrs pointer back to NULL.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Reviewed-by: default avatarAlex Elder <elder@inktank.com>
parent 85effe18
...@@ -457,6 +457,7 @@ static int __build_xattrs(struct inode *inode) ...@@ -457,6 +457,7 @@ static int __build_xattrs(struct inode *inode)
for (i = 0; i < numattr; i++) for (i = 0; i < numattr; i++)
kfree(xattrs[i]); kfree(xattrs[i]);
kfree(xattrs); kfree(xattrs);
xattrs = NULL;
goto start; goto start;
} }
err = -EIO; err = -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment