]> git.baikalelectronics.ru Git - kernel.git/commit
mISDN: Fix memory leak in dsp_pipeline_build()
authorAlexey Khoroshilov <khoroshilov@ispras.ru>
Fri, 4 Mar 2022 18:25:36 +0000 (21:25 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 5 Mar 2022 12:04:14 +0000 (12:04 +0000)
commit2dd1dcfda66cae1fb57562446320dec8fa81d038
treeceac43f3f5a0351f3724fb8960e6765de19647c9
parent7c92640d8b793579b4fac822c1f5b57aab910a1a
mISDN: Fix memory leak in dsp_pipeline_build()

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: 0ca0b2a4655f ("Add mISDN DSP")
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/mISDN/dsp_pipeline.c