linux-brain/net/netlink
YueHaibing 111fdc6e94 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:25:08 +02:00
..
af_netlink.c netlink: Don't shift on 64 for ngroups 2018-08-09 12:16:38 +02:00
af_netlink.h af_netlink: ensure that NLMSG_DONE never fails in dumps 2017-11-24 08:37:03 +01:00
diag.c netlink/diag: report flags for netlink sockets 2017-04-05 07:13:56 -07:00
genetlink.c genetlink: Fix a memory leak on error path 2019-04-03 06:25:08 +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