summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstsp <stsp@openbsd.org>2019-05-21 09:19:25 +0000
committerstsp <stsp@openbsd.org>2019-05-21 09:19:25 +0000
commite68dbf3b39d83176376534a21fdcdc1ee67cf823 (patch)
tree927189d716c37d7b639ece751c5c3d9973ae7c33
parentFix uninitialized return code in adjfreq(2); CID 1480285 (diff)
downloadwireguard-openbsd-e68dbf3b39d83176376534a21fdcdc1ee67cf823.tar.xz
wireguard-openbsd-e68dbf3b39d83176376534a21fdcdc1ee67cf823.zip
Fix free(9) with wrong pointer in sili(4) attach error path; CID 1480295
ok jmatthew@
-rw-r--r--sys/dev/ic/sili.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/ic/sili.c b/sys/dev/ic/sili.c
index 4512628bdd1..5659b374fab 100644
--- a/sys/dev/ic/sili.c
+++ b/sys/dev/ic/sili.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sili.c,v 1.58 2015/12/19 20:05:32 tb Exp $ */
+/* $OpenBSD: sili.c,v 1.59 2019/05/21 09:19:25 stsp Exp $ */
/*
* Copyright (c) 2007 David Gwynne <dlg@openbsd.org>
@@ -767,7 +767,7 @@ sili_ports_alloc(struct sili_softc *sc)
freeports:
/* bus_space(9) says subregions dont have to be freed */
- free(sp, M_DEVBUF, sc->sc_nports * sizeof(struct sili_port));
+ free(sc->sc_ports, M_DEVBUF, sc->sc_nports * sizeof(struct sili_port));
sc->sc_ports = NULL;
return (1);
}