summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/installboot/util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/installboot/util.c b/usr.sbin/installboot/util.c
index c62d145b875..305362f3a1c 100644
--- a/usr.sbin/installboot/util.c
+++ b/usr.sbin/installboot/util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.12 2018/07/03 20:14:41 jcs Exp $ */
+/* $OpenBSD: util.c,v 1.13 2018/11/07 04:51:56 miko Exp $ */
/*
* Copyright (c) 2014 Joel Sing <jsing@openbsd.org>
@@ -124,11 +124,11 @@ fileprefix(const char *base, const char *path)
goto err;
}
n = snprintf(s, PATH_MAX, "%s/%s", r, b);
- free(r);
if (n < 1 || n >= PATH_MAX) {
warn("snprintf");
goto err;
}
+ free(r);
return (s);
err: