summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2016-04-28 16:48:19 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2016-04-28 16:48:19 +0000
commit2e30d192e1b3f71af1f52191a4eee816cdc76a37 (patch)
tree2fe1a1bb93d9e2247d00157989b7d4d8dbaca4e4
parent2a54a037e09116281cdb5c3a28dd91679cc7d5d2 (diff)
Plug a couple of leaks of input buffers.
Pointed out by David Carlier.
-rw-r--r--usr.sbin/installboot/i386_installboot.c4
-rw-r--r--usr.sbin/installboot/i386_softraid.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/installboot/i386_installboot.c b/usr.sbin/installboot/i386_installboot.c
index 793a0937531..4842d21957b 100644
--- a/usr.sbin/installboot/i386_installboot.c
+++ b/usr.sbin/installboot/i386_installboot.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i386_installboot.c,v 1.26 2015/12/28 23:00:29 krw Exp $ */
+/* $OpenBSD: i386_installboot.c,v 1.27 2016/04/28 16:48:18 krw Exp $ */
/* $NetBSD: installboot.c,v 1.5 1995/11/17 23:23:50 gwr Exp $ */
/*
@@ -794,6 +794,8 @@ getbootparams(char *boot, int devfd, struct disklabel *dl)
(unsigned int)((((char *)ap) - buf) + INODEOFF));
}
+ free (buf);
+
return 0;
}
diff --git a/usr.sbin/installboot/i386_softraid.c b/usr.sbin/installboot/i386_softraid.c
index fec2740a40f..4e8bbe26e7e 100644
--- a/usr.sbin/installboot/i386_softraid.c
+++ b/usr.sbin/installboot/i386_softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i386_softraid.c,v 1.9 2015/12/01 06:39:52 krw Exp $ */
+/* $OpenBSD: i386_softraid.c,v 1.10 2016/04/28 16:48:18 krw Exp $ */
/*
* Copyright (c) 2012 Joel Sing <jsing@openbsd.org>
*
@@ -194,5 +194,6 @@ sr_install_bootldr(int devfd, char *dev)
fprintf(stderr, "%s is %d blocks x %d bytes\n",
stage2, nblocks, bsize);
+ free(p);
close(fd);
}