WSL2-Linux-Kernel/net/netlink
WANG Cong 00ffc1ba02 genetlink: fix a memory leak on error path
In __genl_register_family(), when genl_validate_assign_mc_groups()
fails, we forget to free the memory we possibly allocate for
family->attrbuf.

Note, some callers call genl_unregister_family() to clean up
on error path, it doesn't work because the family is inserted
to the global list in the nearly last step.

Cc: Jakub Kicinski <kubakici@wp.pl>
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-03 16:52:29 -04:00
..
Kconfig netlink: remove mmapped netlink support 2016-02-18 11:42:18 -05:00
Makefile netlink: Diag core and basic socket info dumping (v2) 2013-03-21 12:38:03 -04:00
af_netlink.c netlink: do not enter direct reclaim from netlink_dump() 2016-10-06 20:53:13 -04:00
af_netlink.h net/netlink/af_netlink.h: Remove unused structure. 2016-06-09 22:26:24 -07:00
diag.c netlink: netlink_diag_dump() runs without locks 2016-11-03 16:16:51 -04:00
genetlink.c genetlink: fix a memory leak on error path 2016-11-03 16:52:29 -04:00