YueHaibing 111fdc6e94 genetlink: Fix a memory leak on error path
[ Upstream commit ceabee6c59943bdd5e1da1a6a20dc7ee5f8113a2 ]

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: 2ae0f17df1cd ("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
..
2019-02-23 09:06:44 +01:00
2018-12-01 09:42:51 +01:00
2019-02-06 17:31:32 +01:00
2019-03-23 14:35:16 +01:00
2019-03-19 13:13:23 +01:00
2019-01-09 17:14:46 +01:00