From: mpi Date: Mon, 5 May 2014 21:25:00 +0000 (+0000) Subject: Plug a memory leak, free the keymap's memory on detach. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6bd5c71819a13a13fee3f749acc05863bf84a330;p=openbsd Plug a memory leak, free the keymap's memory on detach. ok miod@ --- 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)