Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=f29... Commit: f29c6083c5e71eec2165bc1b3c41293b73d6c467 Parent: d0a0e58a4de53a0c582acc1d6a9333e7502f0168 Author: Andrew Price anprice@redhat.com AuthorDate: Fri Jan 13 12:12:47 2012 +0000 Committer: Andrew Price anprice@redhat.com CommitterDate: Fri Jan 13 12:12:47 2012 +0000
fsck.gfs2: Plug a leak in find_block_ref()
Spotted by coverity: Variable "ip" going out of scope leaks the storage it points to.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/fsck/pass1b.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c index ae6d45c..9e6f376 100644 --- a/gfs2/fsck/pass1b.c +++ b/gfs2/fsck/pass1b.c @@ -344,6 +344,7 @@ static int find_block_ref(struct gfs2_sbd *sdp, uint64_t inode) log_debug( _("Block %lld (0x%llx) is not gfs2 metadata.\n"), (unsigned long long)inode, (unsigned long long)inode); + fsck_inode_put(&ip); return 1; } /* Check to see if this inode was referenced by another by mistake */
cluster-commits@lists.fedorahosted.org