mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-09 07:23:14 +00:00
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: Alan Cox <alan@linux.intel.com> Reviewed-by: Alex Elder <elder@inktank.com>
This commit is contained in:
parent
85effe183d
commit
21ec6ffa46
@ -457,6 +457,7 @@ static int __build_xattrs(struct inode *inode)
|
||||
for (i = 0; i < numattr; i++)
|
||||
kfree(xattrs[i]);
|
||||
kfree(xattrs);
|
||||
xattrs = NULL;
|
||||
goto start;
|
||||
}
|
||||
err = -EIO;
|
||||
|
Loading…
Reference in New Issue
Block a user