From: Mengdong Lin <mengdong.lin@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx> diff --git a/src/topology/elem.c b/src/topology/elem.c index 12d6a72..00f9eea 100644 --- a/src/topology/elem.c +++ b/src/topology/elem.c @@ -83,8 +83,8 @@ void tplg_elem_free(struct tplg_elem *elem) /* free struct snd_tplg_ object, * the union pointers share the same address */ - if (elem->mixer_ctrl) - free(elem->mixer_ctrl); + if (elem->obj) + free(elem->obj); free(elem); } -- 2.5.0 _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel