cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Andrew Price <anprice@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 1/2] fsck.gfs2: Fix a potential memory leak in pass3
Date: Tue, 10 May 2016 15:43:10 +0100	[thread overview]
Message-ID: <1462891391-19942-1-git-send-email-anprice@redhat.com> (raw)

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 file changed, 1 insertion(+)

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 "
-- 
2.4.11



             reply	other threads:[~2016-05-10 14:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-10 14:43 Andrew Price [this message]
2016-05-10 14:43 ` [Cluster-devel] [PATCH 2/2] gfs2_edit savemeta: Fix use of uninitialized 'blk' Andrew Price

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1462891391-19942-1-git-send-email-anprice@redhat.com \
    --to=anprice@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).