]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libfrog: fix memory leak in bitmap_free
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 26 Apr 2019 21:50:48 +0000 (16:50 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 26 Apr 2019 21:50:48 +0000 (16:50 -0500)
Free the bitmap struct before we null out the caller's pointer.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Bill O'Donnell <billodo@redhat.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libfrog/bitmap.c

index aecdba0d93ffaedbd5716a71953680077b2aab7e..450ebe0af7133200e676897a12deb270b64cd7a1 100644 (file)
@@ -104,6 +104,7 @@ bitmap_free(
                free(ext);
        }
        free(bmap->bt_tree);
+       free(bmap);
        *bmapp = NULL;
 }