mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-05 13:30:00 -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);
|
||||
if (!ref->elem) {
|
||||
SNDERR("cannot find HW config '%s'"
|
||||
" referenced by link '%s'",
|
||||
ref->id, elem->id);
|
||||
" referenced by link '%s'",
|
||||
ref->id, elem->id);
|
||||
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);
|
||||
if (err < 0)
|
||||
return err;
|
||||
link = elem->link; /* realloc */
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue