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:
@@ -457,6 +457,7 @@ start:
|
|||||||
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;
|
||||||
|
Reference in New Issue
Block a user