]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: debug: fix possible memory leak in sof_dfsentry_write()
authorWei Yongjun <weiyongjun1@huawei.com>
Fri, 5 Jul 2019 08:16:37 +0000 (08:16 +0000)
committerMark Brown <broonie@kernel.org>
Fri, 5 Jul 2019 16:58:51 +0000 (17:58 +0100)
commitc7bb95cd7d889cee0d53e36d4b0fad5915106f30
tree394ad5edeffcaec3b36c08b1a2f6384d6190d534
parenta9a63ecb896d9b4ad4873a4d6b7b2a8d6259143c
ASoC: SOF: debug: fix possible memory leak in sof_dfsentry_write()

'string' is malloced in sof_dfsentry_write() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: 6b8202764934 ("ASoC: SOF: debug: add new debugfs entries for IPC flood test")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20190705081637.157169-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/debug.c