Re: [PATCH] soc: qcom: wcnss_ctrl: fix firmware leak on req allocation failure
From: Rosen Penev
Date: Fri Apr 17 2026 - 19:26:05 EST
On Fri, Apr 17, 2026 at 3:56 PM Dmitry Baryshkov
<dmitry.baryshkov@xxxxxxxxxxxxxxxx> wrote:
>
> On Fri, Apr 17, 2026 at 09:17:52PM +0800, Felix Gu wrote:
> > In wcnss_download_nv(), if kzalloc_flex() fails, the current code
> > returns -ENOMEM directly and leaves the firmware reference unreleased.
> >
> > Fixes: 908061f0ad30 ("soc: qcom: wcnss: simplify allocation of req")
> > Signed-off-by: Felix Gu <ustc.gu@xxxxxxxxx>
Same as
https://lore.kernel.org/linux-arm-msm/20260407221519.6824-1-rosenp@xxxxxxxxx/
> > ---
> > drivers/soc/qcom/wcnss_ctrl.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
>
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx>
>
> >
> --
> With best wishes
> Dmitry