genetlink: Fix a memory leak on error path
In genl_register_family(), when idr_alloc() fails, we forget to free the memory we possibly allocate for family->attrbuf. Reported-by: NHulk Robot <hulkci@huawei.com> Fixes: 2ae0f17d ("genetlink: use idr to track families") Signed-off-by: NYueHaibing <yuehaibing@huawei.com> Reviewed-by: NKirill Tkhai <ktkhai@virtuozzo.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录