Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=7e83ff82...
Commit: 7e83ff820e5d9068ac35e04d09d303fc2465afcb
Parent: 90adcabd1d9596e66465f171f2e9f91ad549ed0f
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Fri Sep 19 21:24:48 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Apr 1 16:51:34 2015 +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);
}