summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-06 04:10:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2015-09-06 04:10:35 +0000
commitae756fcd14ffb221898cfa6007e3fcd9df563f57 (patch)
tree1850478ce9a92080f89843776de6afaf0aab232d /sys/dev
parent50df8e02199caf3d770d4542fc8eb04ad5402590 (diff)
firmware size for free()
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/acx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/dev/ic/acx.c b/sys/dev/ic/acx.c
index c2c8ea8b203..7e8a78d5626 100644
--- a/sys/dev/ic/acx.c
+++ b/sys/dev/ic/acx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acx.c,v 1.111 2015/03/14 03:38:47 jsg Exp $ */
+/* $OpenBSD: acx.c,v 1.112 2015/09/06 04:10:34 deraadt Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -1548,7 +1548,7 @@ acx_load_base_firmware(struct acx_softc *sc, const char *name)
/* Load base firmware */
error = acx_load_firmware(sc, 0, ucode, size);
- free(ucode, M_DEVBUF, 0);
+ free(ucode, M_DEVBUF, size);
if (error) {
printf("%s: can't load base firmware\n", ifp->if_xname);
@@ -1599,21 +1599,21 @@ acx_load_radio_firmware(struct acx_softc *sc, const char *name)
* radio firmware can be loaded after it.
*/
if (acx_get_conf(sc, ACX_CONF_MMAP, &mem_map, sizeof(mem_map)) != 0) {
- free(ucode, M_DEVBUF, 0);
+ free(ucode, M_DEVBUF, size);
return (ENXIO);
}
radio_fw_ofs = letoh32(mem_map.code_end);
/* Put ECPU into sleeping state, before loading radio firmware */
if (acx_exec_command(sc, ACXCMD_SLEEP, NULL, 0, NULL, 0) != 0) {
- free(ucode, M_DEVBUF, 0);
+ free(ucode, M_DEVBUF, size);
return (ENXIO);
}
/* Load radio firmware */
error = acx_load_firmware(sc, radio_fw_ofs, ucode, size);
- free(ucode, M_DEVBUF, 0);
+ free(ucode, M_DEVBUF, size);
if (error) {
printf("%s: can't load radio firmware\n", ifp->if_xname);