Plug memory leaks in kbdmux(4)

Al kudos here for the Clang static analyzer which, unlike Coverity,
failed to flag a false positive.

Found by:	clang static analyzer
CID:		1007072
CID:		1007073
CID:		1007074

MFC after:	1 week
This commit is contained in:
Pedro F. Giffuni 2015-04-23 14:53:45 +00:00
parent 722e25522e
commit 77990dfda9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281889

View File

@ -472,6 +472,11 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags)
KBDMUX_UNLOCK(state);
}
if (needfree) {
free(accmap, M_KBDMUX);
free(fkeymap, M_KBDMUX);
free(keymap, M_KBDMUX);
}
return (0);
bad:
if (needfree) {