-/* $OpenBSD: wsdisplay.c,v 1.129 2017/07/19 20:12:54 kettenis Exp $ */
+/* $OpenBSD: wsdisplay.c,v 1.130 2018/01/17 16:54:19 fcambus Exp $ */
/* $NetBSD: wsdisplay.c,v 1.82 2005/02/27 00:27:52 perry Exp $ */
/*
}
if (size != sc->sc_copybuffer_size && sc->sc_copybuffer_size != 0) {
bzero(sc->sc_copybuffer, sc->sc_copybuffer_size);
- free(sc->sc_copybuffer, M_DEVBUF, 0);
+ free(sc->sc_copybuffer, M_DEVBUF, sc->sc_copybuffer_size);
}
if ((sc->sc_copybuffer = (char *)malloc(size, M_DEVBUF, M_NOWAIT)) ==
NULL) {
-/* $OpenBSD: wskbd.c,v 1.87 2017/05/12 09:16:55 mpi Exp $ */
+/* $OpenBSD: wskbd.c,v 1.88 2018/01/17 16:54:19 fcambus Exp $ */
/* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */
/*
KB_HANDLEDBYWSKBD);
wskbd_update_layout(sc->id, enc);
}
- free(buf, M_TEMP, 0);
+ free(buf, M_TEMP, len);
return(error);
case WSKBDIO_GETMAP: