diff options
author | Gui Hecheng <guihc.fnst@cn.fujitsu.com> | 2013-12-12 18:41:07 +0800 |
---|---|---|
committer | Chris Mason <clm@fb.com> | 2014-01-31 08:22:17 -0800 |
commit | 3cae13ee934311b438ea15e773bc5c7d965d1cd8 (patch) | |
tree | 35ac1175f20ba9a6b317e2f40d93ee639d389942 /volumes.c | |
parent | e3c9596d3fc8b0df647a6cbae55c2d77570de759 (diff) | |
download | btrfs-progs-3cae13ee934311b438ea15e773bc5c7d965d1cd8.tar.gz |
btrfs-progs: remove NULL-ptr judge before free for btrfs-progs
free(3) already checks the pointer for NULL, no need to do it
on your own. This patch make the change globally.
Signed-off-by: Gui Hecheng <guihc.fnst@cn.fujitsu.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <clm@fb.com>
Diffstat (limited to 'volumes.c')
-rw-r--r-- | volumes.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -1267,13 +1267,11 @@ int __btrfs_map_block(struct btrfs_mapping_tree *map_tree, int rw, again: ce = search_cache_extent(&map_tree->cache_tree, logical); if (!ce) { - if (multi) - kfree(multi); + kfree(multi); return -ENOENT; } if (ce->start > logical || ce->start + ce->size < logical) { - if (multi) - kfree(multi); + kfree(multi); return -ENOENT; } |