mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-06 13:29:59 -05:00
topology: fix the wrong memory access (object realloc)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
This commit is contained in:
parent
c765615bce
commit
0ba4d6d9c0
1 changed files with 3 additions and 2 deletions
|
|
@ -252,8 +252,8 @@ static int build_link(snd_tplg_t *tplg, struct tplg_elem *elem)
|
||||||
ref->id, SND_TPLG_TYPE_HW_CONFIG, elem->index);
|
ref->id, SND_TPLG_TYPE_HW_CONFIG, elem->index);
|
||||||
if (!ref->elem) {
|
if (!ref->elem) {
|
||||||
SNDERR("cannot find HW config '%s'"
|
SNDERR("cannot find HW config '%s'"
|
||||||
" referenced by link '%s'",
|
" referenced by link '%s'",
|
||||||
ref->id, elem->id);
|
ref->id, elem->id);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -267,6 +267,7 @@ static int build_link(snd_tplg_t *tplg, struct tplg_elem *elem)
|
||||||
err = tplg_copy_data(tplg, elem, ref);
|
err = tplg_copy_data(tplg, elem, ref);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
link = elem->link; /* realloc */
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue