Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=2e4... Commit: 2e4fd21aeba5030a4ffb24ea4d52259e9e78755c Parent: ddf8ac5616093598271b9cbadc07253ca44dd45b Author: Andrew Price anprice@redhat.com AuthorDate: Fri Jan 6 13:00:54 2012 +0000 Committer: Andrew Price anprice@redhat.com CommitterDate: Fri Jan 6 13:00:54 2012 +0000
gfs2_edit: Fix memory leak in dump_journal()
Spotted by coverity: Variable "j_inode" going out of scope leaks the storage it points to.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/edit/hexedit.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gfs2/edit/hexedit.c b/gfs2/edit/hexedit.c index 72ee7d2..b05a7d6 100644 --- a/gfs2/edit/hexedit.c +++ b/gfs2/edit/hexedit.c @@ -2775,6 +2775,7 @@ static void dump_journal(const char *journal) block = saveblk; } } + inode_put(&j_inode); brelse(j_bh); blockhist = -1; /* So we don't print anything else */ free(jbuf);
cluster-commits@lists.fedorahosted.org