]> git.alsa-project.org Git - alsa-lib.git/commit
ucm: avoid relinking cached controls when adding an alias
authorReuben Grinberg <reuben.grinberg@aya.yale.edu>
Sun, 1 Nov 2026 18:49:36 +0000 (12:49 -0600)
committerJaroslav Kysela <perex@perex.cz>
Mon, 30 Nov 2026 14:10:55 +0000 (15:10 +0100)
commit8c8949be7c46bcf339d728d034fcec1a92e78582
tree3d7b9289b1b5479b890b693194d8a1bd58f662d3
parent5aa1c3d38be43f9186e325b9aec00abac4549913
ucm: avoid relinking cached controls when adding an alias

uc_mgr_open_ctl() calls uc_mgr_ctl_add() with an existing entry when
another device name resolves to the same control card. Adding that
entry to ctl_list again corrupts the list and can double-free the
control handle during failed UCM import cleanup.

Only link entries allocated by this invocation. Existing entries keep
their original list membership while their device aliases are added.

Closes: https://github.com/alsa-project/alsa-lib/pull/539
Signed-off-by: Reuben Grinberg <reuben.grinberg@aya.yale.edu>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
src/ucm/utils.c