Re: [PATCH 1/3] net: dsa: Use devm_ prefixed allocations

From: Felix Fietkau
Date: Fri Oct 02 2015 - 09:25:24 EST


On 2015-10-02 12:48, Neil Armstrong wrote:
> To simplify and prevent memory leakage when unbinding, use
> the devm_ memory allocation calls.
>
> Tested-by: Andrew Lunn <andrew@xxxxxxx>
> Tested-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
> Signed-off-by: Neil Armstrong <narmstrong@xxxxxxxxxxxx>
I think you also need to get rid of the corresponding free calls in the
error path, otherwise it will probably crash at some point.

- Felix
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/