mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -05:00
topology: fix coverity issues
This commit is contained in:
parent
996dd33b5f
commit
7f3ad37fd7
4 changed files with 15 additions and 9 deletions
|
|
@ -178,8 +178,10 @@ struct tplg_elem* tplg_elem_new_common(snd_tplg_t *tplg,
|
|||
if (snd_config_get_id(n, &id))
|
||||
continue;
|
||||
if (strcmp(id, "index") == 0) {
|
||||
if (snd_config_get_string(n, &val) < 0)
|
||||
if (snd_config_get_string(n, &val) < 0) {
|
||||
free(elem);
|
||||
return NULL;
|
||||
}
|
||||
elem->index = atoi(val);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue