diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-05 21:25:01 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-05 21:25:01 +0000 |
commit | a88cdad1a06f6092f6aa6a4b65756625deef9057 (patch) | |
tree | d333e69f19f34ebca145c9e3f6fd3cb9397bb08f /sys/dev | |
parent | d9cec755abdf5f78969039c649172e632d09eeec (diff) |
Plug a memory leak, free the keymap's memory on detach.
ok miod@
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/wscons/wskbd.c | 4 |
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) |