diff options
author | Bill O'Donnell <billodo@redhat.com> | 2017-06-29 13:05:41 -0500 |
---|---|---|
committer | Eric Sandeen <sandeen@redhat.com> | 2017-06-29 13:05:41 -0500 |
commit | e177680d579619c54bf65adb7963e74e435eeb3b (patch) | |
tree | 9177793c6bf498eafb1a8666793a0ef7af81ca53 | |
parent | db23e0f431a77d228b5f68ef0a8587c25c689133 (diff) | |
download | xfsprogs-dev-e177680d579619c54bf65adb7963e74e435eeb3b.tar.gz |
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 <billodo@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r-- | spaceman/freesp.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/spaceman/freesp.c b/spaceman/freesp.c index 22aec82157..367c95d115 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) |