mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
conf: fix parse_array_def - merge arrays
A tiny overlook caused wrong array merge. New compound member must be always created. Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
e5cb0b3346
commit
eeca04741d
1 changed files with 2 additions and 1 deletions
|
|
@ -1274,7 +1274,7 @@ static int parse_array_def(snd_config_t *parent, input_t *input, int *idx, int s
|
|||
if (_snd_config_search(parent, static_id, -1, &n) == 0) {
|
||||
if (override) {
|
||||
snd_config_delete(n);
|
||||
n = NULL;
|
||||
/* fallthrough to break */
|
||||
} else {
|
||||
/* merge */
|
||||
(*idx)++;
|
||||
|
|
@ -1283,6 +1283,7 @@ static int parse_array_def(snd_config_t *parent, input_t *input, int *idx, int s
|
|||
}
|
||||
break;
|
||||
}
|
||||
n = NULL;
|
||||
id = strdup(static_id);
|
||||
if (id == NULL)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue