From: Alan Cox Date: Fri, 20 Jul 2012 13:18:36 +0000 (-0500) Subject: ceph: fix potential double free X-Git-Tag: upstream/snapshot3+hdmi~6908^2~48 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=21ec6ffa46719a4ed45531b5b01014c26f0416c4;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Reviewed-by: Alex Elder --- diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 785cb30..2c2ae5b 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -457,6 +457,7 @@ start: for (i = 0; i < numattr; i++) kfree(xattrs[i]); kfree(xattrs); + xattrs = NULL; goto start; } err = -EIO;