]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ASoC: meson: fix memory leak of links if allocation of ldata fails
authorColin Ian King <colin.king@canonical.com>
Thu, 4 Jun 2020 17:12:16 +0000 (18:12 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 5 Jun 2020 11:13:03 +0000 (12:13 +0100)
commit6e801dc411329aff592fbd48fb116183d0acdb00
tree1fd9b044f7b74e3d08f82ed8d946dcabe4eb8282
parent97ed3e509ee6d098730d137759c627a8d674cf55
ASoC: meson: fix memory leak of links if allocation of ldata fails

Currently if the allocation of ldata fails the error return path
does not kfree the allocated links object.  Fix this by adding
an error exit return path that performs the necessary kfree'ing.

Fixes: 7864a79f37b5 ("ASoC: meson: add axg sound card support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Addresses-Coverity: ("Resource leak")
Link: https://lore.kernel.org/r/20200604171216.60043-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/meson/meson-card-utils.c