RE: [PATCH v2] net: mana: Fix possible double free in error handling path

From: Konstantin Taranov
Date: Tue Jun 25 2024 - 05:41:35 EST



> When auxiliary_device_add() returns error and then calls
> auxiliary_device_uninit(), callback function adev_release calls kfree(madev).
> We shouldn't call kfree(madev) again in the error handling path. Set 'madev'
> to NULL.
>
> Signed-off-by: Ma Ke <make24@xxxxxxxxxxx>
> ---
> Changes in v2:
> - streamlined the patch according suggestions;
> - revised the description.

The change is ok, but the commit message is missing a "Fixes" tag/line.
- Konstantin