]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfsprogs: call libxfs_destroy from other utilities
authorEric Sandeen <sandeen@redhat.com>
Fri, 9 Mar 2018 02:35:22 +0000 (20:35 -0600)
committerEric Sandeen <sandeen@redhat.com>
Fri, 9 Mar 2018 02:35:22 +0000 (20:35 -0600)
Call libxfs_destroy() from xfs_copy, xfs_db, mkfs.xfs, and
xfs_repair to allow us to detect leaked items in these
utilities as well.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
copy/xfs_copy.c
db/init.c
mkfs/xfs_mkfs.c
repair/xfs_repair.c

index 16ee4d9c5180f932249850dccab118f2c00c4535..0b80613f4e64ba6759fb590d87ae0ef526eb30e6 100644 (file)
@@ -1215,6 +1215,7 @@ main(int argc, char **argv)
 
        check_errors();
        libxfs_umount(mp);
+       libxfs_destroy();
 
        return 0;
 }
index b108a06cfe8e47a212563d8a318ea06518492a6d..29fc344c6a9528b5bd94bf1fe5ef0fcf9202b0ec 100644 (file)
--- a/db/init.c
+++ b/db/init.c
@@ -236,5 +236,7 @@ close_devices:
                libxfs_device_close(x.logdev);
        if (x.rtdev)
                libxfs_device_close(x.rtdev);
+       libxfs_destroy();
+
        return exitcode;
 }
index f973b6bc155360bad3f06439490dcb996e4f44de..1ca6a2d148c4bb08483ccbfdcb5e2a8ea4f84f70 100644 (file)
@@ -4045,6 +4045,7 @@ main(
        if (xi.logdev && xi.logdev != xi.ddev)
                libxfs_device_close(xi.logdev);
        libxfs_device_close(xi.ddev);
+       libxfs_destroy();
 
        return 0;
 }
index b2dd91b5252757f4858984a2d7bdf2a9d6ff11a7..312a0d0869aa8f1ce21ad00d0fc6b393469c4cf8 100644 (file)
@@ -1082,6 +1082,7 @@ _("Note - stripe unit (%d) and width (%d) were copied from a backup superblock.\
        if (x.logdev && x.logdev != x.ddev)
                libxfs_device_close(x.logdev);
        libxfs_device_close(x.ddev);
+       libxfs_destroy();
 
        if (verbose)
                summary_report();