linux-stable/net/netlink
YueHaibing 9b8ef421b4 genetlink: Fix a memory leak on error path
[ Upstream commit ceabee6c59 ]

In genl_register_family(), when idr_alloc() fails,
we forget to free the memory we possibly allocate for
family->attrbuf.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 2ae0f17df1 ("genetlink: use idr to track families")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Reviewed-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03 06:26:15 +02:00
..
af_netlink.c Merge ra.kernel.org:/pub/scm/linux/kernel/git/davem/net 2018-08-05 13:04:31 -07:00
af_netlink.h af_netlink: ensure that NLMSG_DONE never fails in dumps 2017-11-13 10:17:13 +09:00
diag.c rhashtable: Change rhashtable_walk_start to return void 2017-12-11 09:58:38 -05:00
genetlink.c genetlink: Fix a memory leak on error path 2019-04-03 06:26:15 +02: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