Re: [PATCH] genetlink: Fix a memory leak on error path

From: David Miller
Date: Thu Mar 21 2019 - 12:30:07 EST


From: Yue Haibing <yuehaibing@xxxxxxxxxx>
Date: Thu, 21 Mar 2019 15:02:50 +0800

> From: YueHaibing <yuehaibing@xxxxxxxxxx>
>
> 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@xxxxxxxxxx>
> Fixes: 2ae0f17df1cd ("genetlink: use idr to track families")
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>

Applied and queued up for -stable, thanks.