ASoC: topology: fix memory leaks on sm, se and sbe
Currently when a kstrdup fails the error exit paths don't free the allocations for sm, se and sbe. This can be fixed by assigning kc[i].private_value to these before doing the ksrtdup so that the error exit path will be able to free these objects. Addresses-Coverity: ("Resource leak") Fixes: 9f90af3a ("ASoC: topology: Consolidate and fix asoc_tplg_dapm_widget_*_create flow") Signed-off-by: NColin Ian King <colin.king@canonical.com> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录