mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-01 22:58:49 -04:00
ucm: split conf_file_name and conf_dir_name
With ucm2, the file name might differ from the directory name. Also, allocate those fields. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
b34715004f
commit
fe6425af75
5 changed files with 37 additions and 17 deletions
|
|
@ -1700,12 +1700,13 @@ int snd_use_case_get(snd_use_case_mgr_t *uc_mgr,
|
|||
err = 0;
|
||||
} else if (strcmp(identifier, "_file") == 0) {
|
||||
/* get the conf file name of the opened card */
|
||||
if ((uc_mgr->card_name == NULL)
|
||||
|| (uc_mgr->conf_file_name[0] == '\0')) {
|
||||
if ((uc_mgr->card_name == NULL) ||
|
||||
(uc_mgr->conf_file_name == NULL) ||
|
||||
(uc_mgr->conf_file_name[0] == '\0')) {
|
||||
err = -ENOENT;
|
||||
goto __end;
|
||||
}
|
||||
*value = strndup(uc_mgr->conf_file_name, MAX_FILE);
|
||||
*value = strdup(uc_mgr->conf_file_name);
|
||||
if (*value == NULL) {
|
||||
err = -ENOMEM;
|
||||
goto __end;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue