diff options
author | Eric Sandeen <sandeen@redhat.com> | 2013-02-25 16:54:38 -0600 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2013-02-27 14:39:31 +0100 |
commit | bbf1919b007c7d7ca88bce2cda500a403cfa7a7e (patch) | |
tree | 0742c430b383dc1e3e21032ecbd0fb14bd1565f2 /volumes.c | |
parent | b808cb66aa7e68bfadfc73f8e5191d284413e3d1 (diff) |
btrfs-progs: avoid double-free in __btrfs_map_block
__btrfs_map_block() can possibly do the goto again: loop after
having allocated & freed the "multi" pointer. There are then
a couple error conditions where it will attempt to again kfree
the now non-NULL multi pointer. So before retrying, reset
multi to NULL after we free it.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -1226,6 +1226,7 @@ again: if (multi_ret && stripes_allocated < stripes_required) { stripes_allocated = stripes_required; kfree(multi); + multi = NULL; goto again; } stripe_nr = offset; |