commit | 21ec6ffa46719a4ed45531b5b01014c26f0416c4 | [log] [tgz] |
---|---|---|
author | Alan Cox <alan@linux.intel.com> | Fri Jul 20 08:18:36 2012 -0500 |
committer | Sage Weil <sage@inktank.com> | Mon Jul 30 18:15:35 2012 -0700 |
tree | cbdfa66b0b8c6dbe7911eab10e94ba0c21a50abd | |
parent | 85effe183dd45854d1ad1a370b88cddb403c4c91 [diff] [blame] |
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>
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 @@ for (i = 0; i < numattr; i++) kfree(xattrs[i]); kfree(xattrs); + xattrs = NULL; goto start; } err = -EIO;