Re: [PATCH] net: ethernet: Fix memleak in ethoc_probe
From: Andrew Lunn
Date: Wed Dec 23 2020 - 10:34:38 EST
On Wed, Dec 23, 2020 at 07:06:12PM +0800, Dinghao Liu wrote:
> When mdiobus_register() fails, priv->mdio allocated
> by mdiobus_alloc() has not been freed, which leads
> to memleak.
>
> Signed-off-by: Dinghao Liu <dinghao.liu@xxxxxxxxxx>
Fixes: bfa49cfc5262 ("net/ethoc: fix null dereference on error exit path")
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew