From e177680d579619c54bf65adb7963e74e435eeb3b Mon Sep 17 00:00:00 2001 From: Bill O'Donnell Date: Thu, 29 Jun 2017 13:05:41 -0500 Subject: [PATCH] xfs_spaceman: fix potential memory leak by malloc in scan_ag scan_ag mallocs memory that is potentially leaked. Add a free to alleviate the potential leak. Addresses-Coverity-Id: 1413772 Signed-off-by: Bill O'Donnell Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- spaceman/freesp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spaceman/freesp.c b/spaceman/freesp.c index 22aec8215..367c95d11 100644 --- a/spaceman/freesp.c +++ b/spaceman/freesp.c @@ -239,7 +239,9 @@ scan_ag( printf(_("%10u %10llu %10llu\n"), agno, freeexts, freeblks); } + free(fsmap); } + static void aglistadd( char *a) -- 2.50.1