[alsa-devel] [PATCH v2 1/7] topology: Use the generic pointer to free an element's object
mengdong.lin at linux.intel.com
mengdong.lin at linux.intel.com
Wed Mar 30 09:10:37 CEST 2016
From: Mengdong Lin <mengdong.lin at linux.intel.com>
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 at linux.intel.com>
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
More information about the Alsa-devel
mailing list