[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Cluster-devel] [PATCH 2/8] gfs2_edit: Fix another resource leak in display_extended



Spotted by coverity: Variable "tmp_inode" going out of scope leaks the
storage it points to. (1 remaining occurrence.)

Signed-off-by: Andrew Price <anprice redhat com>
---
 gfs2/edit/extended.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/gfs2/edit/extended.c b/gfs2/edit/extended.c
index 1066e1b..566fb5b 100644
--- a/gfs2/edit/extended.c
+++ b/gfs2/edit/extended.c
@@ -656,6 +656,7 @@ int display_extended(void)
 		tmp_bh = bread(&sbd, block);
 		tmp_inode = inode_get(&sbd, tmp_bh);
 		parse_rindex(tmp_inode, TRUE);
+		inode_put(&tmp_inode);
 		brelse(tmp_bh);
 	}
 	else if (has_indirect_blocks() && !indirect_blocks &&
-- 
1.7.6.5


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]