mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
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:
parent
722e25522e
commit
77990dfda9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=281889
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue