[PATCH v4] media: platform: mtk-mdp3: Add missing check and free for ida_alloc

AngeloGioacchino Del Regno angelogioacchino.delregno at collabora.com
Tue Feb 14 02:10:54 PST 2023


Il 09/02/23 14:52, Jiasheng Jiang ha scritto:
> Add the check for the return value of the ida_alloc in order to avoid
> NULL pointer dereference.
> Moreover, free allocated "ctx->id" if mdp_m2m_open fails later in order
> to avoid memory leak.
> 
> Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
> Signed-off-by: Jiasheng Jiang <jiasheng at iscas.ac.cn>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>





More information about the linux-arm-kernel mailing list