Author: pfg
Date: Thu Apr 23 14:53:45 2015
New Revision: 281889
URL: https://svnweb.freebsd.org/changeset/base/281889
Log:
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
Modified:
head/sys/dev/kbdmux/kbdmux.c
Modified: head/sys/dev/kbdmux/kbdmux.c
==============================================================================
--- head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 14:36:01 2015
(r281888)
+++ head/sys/dev/kbdmux/kbdmux.c Thu Apr 23 14:53:45 2015
(r281889)
@@ -472,6 +472,11 @@ kbdmux_init(int unit, keyboard_t **kbdp,
KBDMUX_UNLOCK(state);
}
+ if (needfree) {
+ free(accmap, M_KBDMUX);
+ free(fkeymap, M_KBDMUX);
+ free(keymap, M_KBDMUX);
+ }
return (0);
bad:
if (needfree) {
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"