]> git.alsa-project.org Git - alsa-lib.git/commitdiff
topology: Use the generic pointer to free an element's object
authorMengdong Lin <mengdong.lin@linux.intel.com>
Thu, 7 Apr 2016 07:28:42 +0000 (15:28 +0800)
committerTakashi Iwai <tiwai@suse.de>
Thu, 7 Apr 2016 14:57:21 +0000 (16:57 +0200)
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>
src/topology/elem.c

index 12d6a725e56b91b2d7df402e6ec5e45a16102f27..00f9eeaff3d9f84901849e39acc9cbbc56fe3939 100644 (file)
@@ -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);
 }