All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: "'linux-xfs@oss.sgi.com'" <linux-xfs@oss.sgi.com>
Subject: [PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags
Date: Wed, 31 Jul 2013 21:25:18 -0500	[thread overview]
Message-ID: <51F9C70E.30702@sandeen.net> (raw)

agcnts is malloc'd but never freed in this function.

Coverity found this.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/repair/scan.c b/repair/scan.c
index 76bb7f1..4040f53 100644
--- a/repair/scan.c
+++ b/repair/scan.c
@@ -1367,6 +1367,8 @@ scan_ags(
 		ifreecount += agcnts[i].ifreecount;
 	}
 
+	free(agcnts);
+
 	/*
 	 * Validate that our manual counts match the superblock.
 	 */

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

             reply	other threads:[~2013-08-01  2:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-01  2:25 Eric Sandeen [this message]
2013-08-01 14:56 ` [PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags Mark Tinguely

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=51F9C70E.30702@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=linux-xfs@oss.sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.