Re: [PATCH -next] firmware: imx: Add missing return in error path to prevent use-after-free.

From: Frank . Li

Date: Mon Jun 01 2026 - 17:21:47 EST


From: Frank Li <Frank.Li@xxxxxxx>


On Thu, 28 May 2026 14:44:46 +0530, Pankaj Gupta wrote:
> After freeing dev_ctx and setting *new_dev_ctx to NULL, the function
> continues execution and dereferences dev_ctx, leading to a potential
> use-after-free. Return immediately to avoid accessing freed memory.
>
> This appears to have been lost during merge of the original fix.
>
>
> [...]

Applied, thanks!

[1/1] firmware: imx: Add missing return in error path to prevent use-after-free.
commit: 28599a13adb5db6b4fb63ce088766c456f8f562b

Best regards,
--
Frank Li <Frank.Li@xxxxxxx>