Plug memory leaks in kbdmux(4) (take 2)
This is a fix to the previous attempt in r281889, which some (most?) keyboards. Discussed with: emaste, jkim Found by: clang static analyzer CID: 1007072 CID: 1007073 CID: 1007074
This commit is contained in:
parent
85ffc58684
commit
3b7176c90a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282226
@ -470,6 +470,10 @@ kbdmux_init(int unit, keyboard_t **kbdp, void *arg, int flags)
|
||||
KBDMUX_LOCK(state);
|
||||
callout_reset(&state->ks_timo, TICKS, kbdmux_kbd_intr_timo, state);
|
||||
KBDMUX_UNLOCK(state);
|
||||
} else if (needfree) {
|
||||
free(accmap, M_KBDMUX);
|
||||
free(fkeymap, M_KBDMUX);
|
||||
free(keymap, M_KBDMUX);
|
||||
}
|
||||
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user