From: Andrew Price Date: Fri, 6 Jan 2012 15:19:23 +0000 Subject: [Cluster-devel] [PATCH 04/11] gfs2_edit: Fix memory leak in dump_journal() In-Reply-To: <1325863170-32530-1-git-send-email-anprice@redhat.com> References: <1325863170-32530-1-git-send-email-anprice@redhat.com> Message-ID: <1325863170-32530-4-git-send-email-anprice@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Spotted by coverity: Variable "j_inode" going out of scope leaks the storage it points to. Signed-off-by: Andrew Price --- 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); -- 1.7.6.4