We leave in a hotpluggable world.  Let's free in detach() the memory
allocated in attach(). 

While here I realize that M_TEMP might not be the best type to describe
the keymap, M_DEVBUF maybe?

Ok?

Index: wskbd.c
===================================================================
RCS file: /cvs/src/sys/dev/wscons/wskbd.c,v
retrieving revision 1.76
diff -u -p -r1.76 wskbd.c
--- wskbd.c     26 Jan 2014 17:48:08 -0000      1.76
+++ wskbd.c     5 May 2014 08:11:32 -0000
@@ -624,6 +624,8 @@ wskbd_detach(struct device  *self, int f
                splx(s);
        }
 
+       free(sc->sc_map, M_TEMP);
+
        /* locate the major number */
        for (maj = 0; maj < nchrdev; maj++)
                if (cdevsw[maj].d_open == wskbdopen)

Reply via email to