mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-02 09:01:48 -05:00
UCM: Fix deadlock following failed get _verb
When querying the current verb without a verb set, snd_use_case_get bails out early without unlocking uc_mgr->mutex. This causes subsequent API calls to hang. Instead, s/return/goto __end/. Signed-off-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
0a2fd2d386
commit
0a4b1ee746
1 changed files with 4 additions and 2 deletions
|
|
@ -1132,8 +1132,10 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
||||||
}
|
}
|
||||||
err = 0;
|
err = 0;
|
||||||
} else if (strcmp(identifier, "_verb") == 0) {
|
} else if (strcmp(identifier, "_verb") == 0) {
|
||||||
if (uc_mgr->active_verb == NULL)
|
if (uc_mgr->active_verb == NULL) {
|
||||||
return -ENOENT;
|
err = -ENOENT;
|
||||||
|
goto __end;
|
||||||
|
}
|
||||||
*value = strdup(uc_mgr->active_verb->name);
|
*value = strdup(uc_mgr->active_verb->name);
|
||||||
if (*value == NULL) {
|
if (*value == NULL) {
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue