aboutsummaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-sub-ui.c
diff options
context:
space:
mode:
authorYu Liao <[email protected]>2022-03-18 10:16:16 +0800
committerMark Brown <[email protected]>2022-04-07 18:29:37 +0100
commit9b91d0ece22b9ab37fc185511c7f992e51c93d6e (patch)
treeae5b1f2074283728d81faea0e92a47903b17e225 /lib/mpi/mpi-sub-ui.c
parent20744617bdbafe2e7fb7bf5401f616e24bde4471 (diff)
ASoC: SOF: topology: Fix memory leak in sof_control_load()
scontrol doesn't get freed when kstrdup returns NULL. Fix by free iscontrol in that case. scontrol = kzalloc(sizeof(*scontrol), GFP_KERNEL); if (!scontrol) return -ENOMEM; scontrol->name = kstrdup(hdr->name, GFP_KERNEL); if (!scontrol->name) return -ENOMEM; Signed-off-by: Yu Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-sub-ui.c')
0 files changed, 0 insertions, 0 deletions