summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
authorGui Hecheng <guihc.fnst@cn.fujitsu.com>2013-12-12 18:41:07 +0800
committerChris Mason <clm@fb.com>2014-01-31 08:22:17 -0800
commit3cae13ee934311b438ea15e773bc5c7d965d1cd8 (patch)
tree35ac1175f20ba9a6b317e2f40d93ee639d389942 /mkfs.c
parente3c9596d3fc8b0df647a6cbae55c2d77570de759 (diff)
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 'mkfs.c')
-rw-r--r--mkfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mkfs.c b/mkfs.c
index 1350ee1d..80977ad0 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -721,8 +721,7 @@ again:
goto again;
end:
- if (eb)
- free(eb);
+ free(eb);
close(fd);
return ret;
}