mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-10-31 22:25:35 -04:00
ucm: add missing uc_mgr_card_close() call to snd_use_case_mgr_open()
Handle the error path correctly. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
02b234a39c
commit
447a676ee5
1 changed files with 5 additions and 2 deletions
|
|
@ -1306,8 +1306,10 @@ int snd_use_case_mgr_open(snd_use_case_mgr_t **uc_mgr,
|
|||
pthread_mutex_init(&mgr->mutex, NULL);
|
||||
|
||||
err = uc_mgr_card_open(mgr);
|
||||
if (err < 0)
|
||||
goto _err;
|
||||
if (err < 0) {
|
||||
uc_mgr_free(mgr);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = snd_config_top(&mgr->local_config);
|
||||
if (err < 0)
|
||||
|
|
@ -1337,6 +1339,7 @@ int snd_use_case_mgr_open(snd_use_case_mgr_t **uc_mgr,
|
|||
return 0;
|
||||
|
||||
_err:
|
||||
uc_mgr_card_close(mgr);
|
||||
uc_mgr_free(mgr);
|
||||
return err;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue