summaryrefslogtreecommitdiff
path: root/usr.sbin/installboot/powerpc64_installboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/installboot/powerpc64_installboot.c')
-rw-r--r--usr.sbin/installboot/powerpc64_installboot.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/installboot/powerpc64_installboot.c b/usr.sbin/installboot/powerpc64_installboot.c
index a8d07f0fd40..c4765ab0c0d 100644
--- a/usr.sbin/installboot/powerpc64_installboot.c
+++ b/usr.sbin/installboot/powerpc64_installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: powerpc64_installboot.c,v 1.7 2022/09/27 11:31:46 kn Exp $ */
+/* $OpenBSD: powerpc64_installboot.c,v 1.8 2022/11/06 12:33:41 krw Exp $ */
/*
* Copyright (c) 2011 Joel Sing <jsing@openbsd.org>
@@ -145,6 +145,7 @@ create_filesystem(struct disklabel *dl, char part)
rslt = snprintf(cmd, sizeof(cmd), newfsfmt, args.fspec);
if (rslt >= sizeof(cmd)) {
warnx("can't build newfs command");
+ free(args.fspec);
rslt = -1;
return rslt;
}
@@ -156,10 +157,12 @@ create_filesystem(struct disklabel *dl, char part)
rslt = system(cmd);
if (rslt == -1) {
warn("system('%s') failed", cmd);
+ free(args.fspec);
return rslt;
}
}
+ free(args.fspec);
return 0;
}