The error may cause segmentation fault and incorrect behaviour.
Closes: https://github.com/alsa-project/alsa-lib/issues/477
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
snd_config_t *n = NULL;
if (!skip) {
snd_config_t *n = NULL;
if (!skip) {
char static_id[12];
while (1) {
snprintf(static_id, sizeof(static_id), "%i", *idx);
char static_id[12];
while (1) {
snprintf(static_id, sizeof(static_id), "%i", *idx);
- if (_snd_config_search(parent, static_id, -1, &g) == 0) {
+ if (_snd_config_search(parent, static_id, -1, &n) == 0) {
if (override) {
snd_config_delete(n);
if (override) {
snd_config_delete(n);
} else {
/* merge */
(*idx)++;
} else {
/* merge */
(*idx)++;