Re: [PATCH] driver core: auxiliary bus: Fix memory leak when driver_register() fail

From: Dan Williams
Date: Tue Jul 13 2021 - 14:17:29 EST


On Tue, Jul 13, 2021 at 2:34 AM Peter Ujfalusi
<peter.ujfalusi@xxxxxxxxxxxxxxx> wrote:
>
> If driver_register() returns with error we need to free the memory
> allocated for auxdrv->driver.name before returning from
> __auxiliary_driver_register()
>
> Fixes: 7de3697e9cbd4 ("Add auxiliary bus support")
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@xxxxxxxxxxxxxxx>

Good catch,

Reviewed-by: Dan Williams <dan.j.williams@xxxxxxxxx>