summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormickey <mickey@openbsd.org>2003-08-11 06:25:36 +0000
committermickey <mickey@openbsd.org>2003-08-11 06:25:36 +0000
commit3aed6e9fc01112f4337c6c27ee7096d767942b05 (patch)
tree717c25997cce17d54dd2a1e78a87731c96890734
parentansification and knf and protos (diff)
downloadwireguard-openbsd-3aed6e9fc01112f4337c6c27ee7096d767942b05.tar.xz
wireguard-openbsd-3aed6e9fc01112f4337c6c27ee7096d767942b05.zip
free code memory should change permissions fail
-rw-r--r--sys/dev/ic/sti.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/ic/sti.c b/sys/dev/ic/sti.c
index d58d1b31714..2427c047866 100644
--- a/sys/dev/ic/sti.c
+++ b/sys/dev/ic/sti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sti.c,v 1.26 2003/06/02 19:24:22 mickey Exp $ */
+/* $OpenBSD: sti.c,v 1.27 2003/08/11 06:25:36 mickey Exp $ */
/*
* Copyright (c) 2000-2003 Michael Shalayeff
@@ -252,6 +252,7 @@ sti_attach_common(sc)
if ((error = uvm_map_protect(kernel_map, sc->sc_code,
sc->sc_code + round_page(size), UVM_PROT_RX, FALSE))) {
printf(": uvm_map_protect failed (%d)\n", error);
+ uvm_km_free(kernel_map, sc->sc_code, round_page(size));
return;
}