diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-20 09:18:36 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2012-07-30 21:15:35 -0400 |
commit | 21ec6ffa46719a4ed45531b5b01014c26f0416c4 (patch) | |
tree | cbdfa66b0b8c6dbe7911eab10e94ba0c21a50abd /fs/ceph | |
parent | 85effe183dd45854d1ad1a370b88cddb403c4c91 (diff) |
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>
Diffstat (limited to 'fs/ceph')
-rw-r--r-- | fs/ceph/xattr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 785cb3057c95..2c2ae5be9902 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c | |||
@@ -457,6 +457,7 @@ start: | |||
457 | for (i = 0; i < numattr; i++) | 457 | for (i = 0; i < numattr; i++) |
458 | kfree(xattrs[i]); | 458 | kfree(xattrs[i]); |
459 | kfree(xattrs); | 459 | kfree(xattrs); |
460 | xattrs = NULL; | ||
460 | goto start; | 461 | goto start; |
461 | } | 462 | } |
462 | err = -EIO; | 463 | err = -EIO; |