summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2014-05-05 21:25:00 +0000
committermpi <mpi@openbsd.org>2014-05-05 21:25:00 +0000
commit6bd5c71819a13a13fee3f749acc05863bf84a330 (patch)
treeb244de013659061b7c93f35e71dd62c5804d49ff
parentca_x509_serialize: don't leak the bio buffer; ok reyk@ (diff)
downloadwireguard-openbsd-6bd5c71819a13a13fee3f749acc05863bf84a330.tar.xz
wireguard-openbsd-6bd5c71819a13a13fee3f749acc05863bf84a330.zip
Plug a memory leak, free the keymap's memory on detach.
ok miod@
-rw-r--r--sys/dev/wscons/wskbd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c
index ebe3d482d50..cdcf0dedb3b 100644
--- a/sys/dev/wscons/wskbd.c
+++ b/sys/dev/wscons/wskbd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: wskbd.c,v 1.76 2014/01/26 17:48:08 miod Exp $ */
+/* $OpenBSD: wskbd.c,v 1.77 2014/05/05 21:25:00 mpi Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
@@ -624,6 +624,8 @@ wskbd_detach(struct device *self, int flags)
splx(s);
}
+ free(sc->sc_map, M_TEMP);
+
/* locate the major number */
for (maj = 0; maj < nchrdev; maj++)
if (cdevsw[maj].d_open == wskbdopen)