Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=d3743efa...
Commit: d3743efabda1118a54beb84e43655809f64a103d
Parent: 45047cbf2cdfa57f309e2235334ed4cb038efb99
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Sep 19 21:24:48 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Fri Sep 19 21:24:48 2014 +0100
libgfs2: Remove superfluous NULL check from gfs2_rgrp_free
Coverity was complaining that this NULL check indicated that previous
dereferences were bad. Remove the NULL check and let free(3) deal with
NULL conditions (of which there are none in this case).
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/libgfs2/rgrp.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/gfs2/libgfs2/rgrp.c b/gfs2/libgfs2/rgrp.c
index 1abcc82..ed8e01d 100644
--- a/gfs2/libgfs2/rgrp.c
+++ b/gfs2/libgfs2/rgrp.c
@@ -254,8 +254,7 @@ void gfs2_rgrp_free(struct osi_root *rgrp_tree)
}
gfs2_rgrp_relse(rgd); /* free them all. */
}
- if(rgd->bits)
- free(rgd->bits);
+ free(rgd->bits);
osi_erase(&rgd->node, rgrp_tree);
free(rgd);
}