[PATCH] media: exynos4-is: Free the control handler if fimc_ctrls_create() fails
Krzysztof Kozlowski
krzk at kernel.org
Tue Nov 3 23:21:00 PST 2026
On 03/11/2026 10:46, Wentao Liang wrote:
> v4l2_ctrl_handler_init() allocates the handler's bucket array, and each
> subsequent v4l2_ctrl_new_std() call allocates a control. When one of
> those calls fails it only records the error in handler->error.
> fimc_ctrls_create() returns that error with ctrls->ready left false, so
> neither caller calls fimc_ctrls_delete(), and that function would not
> free the handler in that state anyway. The bucket array and the
> controls created so far are leaked.
>
> Free the handler before returning the error.
>
> Fixes: 9448ab7dec30 ("[media] s5p-fimc: Add color effect control")
> Cc: stable at vger.kernel.org
> Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
> Signed-off-by: Wentao Liang <vulab at iscas.ac.cn>
This is another posting of bot ignoring feedback and probably
introducing vilnerabilities hidden in big spam posting.
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list