Gitweb: http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=606ea6625fb... Commit: 606ea6625fbbe7839394707ebace1391e0e42d4f Parent: 6dcd8a742df38f4ec4dd288e83c9d917fc7a2255 Author: Andrew Price anprice@redhat.com AuthorDate: Tue May 10 15:04:03 2016 +0100 Committer: Andrew Price anprice@redhat.com CommitterDate: Tue May 10 15:06:57 2016 +0100
fsck.gfs2: Fix a potential memory leak in pass3
Coverity spotted an instance where pass3() breaks out of the loop without first freeing the inode.
Signed-off-by: Andrew Price anprice@redhat.com --- gfs2/fsck/pass3.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/gfs2/fsck/pass3.c b/gfs2/fsck/pass3.c index fbf8318..85d7e36 100644 --- a/gfs2/fsck/pass3.c +++ b/gfs2/fsck/pass3.c @@ -267,6 +267,7 @@ int pass3(struct gfs2_sbd *sdp) " (y/n) "))) { log_err( _("The block was not " "cleared\n")); + fsck_inode_put(&ip); break; } log_warn( _("inode %lld (0x%llx) is now "
cluster-commits@lists.fedorahosted.org