topology: Use the generic pointer to free an element's object

The element is a wrapper for different types of objects.So use the
generic pointer 'obj' instead of the type-specific pointer to free
the object.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Mengdong Lin 2016-04-07 15:28:42 +08:00 committed by Takashi Iwai
parent 503a285ed6
commit 374c5fa9c5

View file

@ -83,8 +83,8 @@ void tplg_elem_free(struct tplg_elem *elem)
/* free struct snd_tplg_ object, /* free struct snd_tplg_ object,
* the union pointers share the same address * the union pointers share the same address
*/ */
if (elem->mixer_ctrl) if (elem->obj)
free(elem->mixer_ctrl); free(elem->obj);
free(elem); free(elem);
} }