prepare-root: Add an autofree
authorColin Walters <walters@verbum.org>
Thu, 7 Dec 2023 15:03:04 +0000 (10:03 -0500)
committerColin Walters <walters@verbum.org>
Thu, 7 Dec 2023 18:31:42 +0000 (13:31 -0500)
This doesn't matter at all, but I just noticed this while working
on the code.

src/switchroot/ostree-prepare-root.c

index 27d06fa7f86c2526bbab1ebf7073859f3e85c671..41fc8f98c3ef40a70889b3a5edb8b6bbac67dcb7 100644 (file)
@@ -374,7 +374,7 @@ main (int argc, char *argv[])
   const char *root_mountpoint = realpath (root_arg, NULL);
   if (root_mountpoint == NULL)
     err (EXIT_FAILURE, "realpath(\"%s\")", root_arg);
-  char *deploy_path = resolve_deploy_path (root_mountpoint);
+  g_autofree char *deploy_path = resolve_deploy_path (root_mountpoint);
 
   if (mkdirat (AT_FDCWD, OTCORE_RUN_OSTREE, 0755) < 0)
     err (EXIT_FAILURE, "Failed to create %s", OTCORE_RUN_OSTREE);