[PATCH] xfsprogs: fix agcnts leak in xfs_repair's scan_ags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Coverity found this.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

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@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs




[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux