summaryrefslogtreecommitdiffstats
path: root/format/format.c
diff options
context:
space:
mode:
Diffstat (limited to 'format/format.c')
-rw-r--r--format/format.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/format/format.c b/format/format.c
index 06428e88..45c9ab4b 100644
--- a/format/format.c
+++ b/format/format.c
@@ -255,6 +255,8 @@ main (int argc, char *argv[])
guestfs_set_verbose (g2, guestfs_get_verbose (g));
guestfs_set_trace (g2, guestfs_get_trace (g));
+ if (guestfs_shutdown (g) == -1)
+ exit (EXIT_FAILURE);
guestfs_close (g);
g = g2;
}
@@ -273,6 +275,8 @@ main (int argc, char *argv[])
/* Free up data structures. */
free_drives (drvs);
+ if (guestfs_shutdown (g) == -1)
+ exit (EXIT_FAILURE);
guestfs_close (g);
exit (EXIT_SUCCESS);