mISDN: Fix memory leak in dsp_pipeline_build()
stable inclusion from stable-v5.10.106 commit a3d5fcc6cf2ecbba5a269631092570aa285a24cb bugzilla: https://gitee.com/openeuler/kernel/issues/I573US Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a3d5fcc6cf2ecbba5a269631092570aa285a24cb -------------------------------- [ Upstream commit c6a502c2 ] dsp_pipeline_build() allocates dup pointer by kstrdup(cfg), but then it updates dup variable by strsep(&dup, "|"). As a result when it calls kfree(dup), the dup variable contains NULL. Found by Linux Driver Verification project (linuxtesting.org) with SVACE. Signed-off-by:Alexey Khoroshilov <khoroshilov@ispras.ru> Fixes: 960366cf ("Add mISDN DSP") Signed-off-by:
David S. Miller <davem@davemloft.net> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
Yu Liao <liaoyu15@huawei.com> Reviewed-by:
Wei Li <liwei391@huawei.com> Signed-off-by:
Zheng Zengkai <zhengzengkai@huawei.com>
Loading
Please sign in to comment