public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags
@ 2013-08-01  2:25 Eric Sandeen
  2013-08-01 14:56 ` Mark Tinguely
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Sandeen @ 2013-08-01  2:25 UTC (permalink / raw)
  To: 'linux-xfs@oss.sgi.com'

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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags
  2013-08-01  2:25 [PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags Eric Sandeen
@ 2013-08-01 14:56 ` Mark Tinguely
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Tinguely @ 2013-08-01 14:56 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: 'linux-xfs@oss.sgi.com'

On 07/31/13 21:25, Eric Sandeen wrote:
> agcnts is malloc'd but never freed in this function.
>
> Coverity found this.
>
> Signed-off-by: Eric Sandeen<sandeen@redhat.com>
> ---
>

Looks good.

Reviewed-by: Mark Tinguely <tinguely@sgi.com>

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-08-01 14:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-01  2:25 [PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags Eric Sandeen
2013-08-01 14:56 ` Mark Tinguely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox