Cleanup patch from Denis Vlasenko.  Mostly variants of removing the if(x)
from before "if(x) free(x)".
diff --git a/e2fsprogs/ext2fs/rw_bitmaps.c b/e2fsprogs/ext2fs/rw_bitmaps.c
index ae7b6e0..d5698a2 100644
--- a/e2fsprogs/ext2fs/rw_bitmaps.c
+++ b/e2fsprogs/ext2fs/rw_bitmaps.c
@@ -163,8 +163,7 @@
 	if (retval)
 		return retval;
 	if (do_block) {
-		if (fs->block_map)
-			ext2fs_free_block_bitmap(fs->block_map);
+		ext2fs_free_block_bitmap(fs->block_map);
 		sprintf(buf, "block bitmap for %s", fs->device_name);
 		retval = ext2fs_allocate_block_bitmap(fs, buf, &fs->block_map);
 		if (retval)
@@ -172,8 +171,7 @@
 		block_bitmap = fs->block_map->bitmap;
 	}
 	if (do_inode) {
-		if (fs->inode_map)
-			ext2fs_free_inode_bitmap(fs->inode_map);
+		ext2fs_free_inode_bitmap(fs->inode_map);
 		sprintf(buf, "inode bitmap for %s", fs->device_name);
 		retval = ext2fs_allocate_inode_bitmap(fs, buf, &fs->inode_map);
 		if (retval)
@@ -247,14 +245,11 @@
 cleanup:
 	if (do_block) {
 		ext2fs_free_mem(&fs->block_map);
-		fs->block_map = 0;
 	}
 	if (do_inode) {
 		ext2fs_free_mem(&fs->inode_map);
-		fs->inode_map = 0;
 	}
-	if (buf)
-		ext2fs_free_mem(&buf);
+	ext2fs_free_mem(&buf);
 	return retval;
 }