All of lore.kernel.org
 help / color / mirror / Atom feed
From: mengdong.lin@linux.intel.com
To: alsa-devel@alsa-project.org, broonie@kernel.org
Cc: Mengdong Lin <mengdong.lin@linux.intel.com>,
	tiwai@suse.de, mengdong.lin@intel.com, vinod.koul@intel.com,
	rakesh.a.ughreja@intel.com, liam.r.girdwood@intel.com,
	hardik.t.shah@intel.com, subhransu.s.prusty@intel.com
Subject: [PATCH 1/7] topology: Use the generic pointer to free an element's object
Date: Thu, 24 Mar 2016 11:06:31 +0800	[thread overview]
Message-ID: <c8d960fe4b38966d873f0f3951aff9879208d112.1458788076.git.mengdong.lin@linux.intel.com> (raw)
In-Reply-To: <cover.1458788076.git.mengdong.lin@linux.intel.com>

From: Mengdong Lin <mengdong.lin@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@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

  reply	other threads:[~2016-03-24  3:04 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-24  3:05 [PATCH 0/7] topology: Add support for vendor tuples mengdong.lin
2016-03-24  3:06 ` mengdong.lin [this message]
2016-03-24  3:06 ` [PATCH 2/7] topology: Define a free handler for the element mengdong.lin
2016-03-24  3:07 ` [PATCH 3/7] topology: Add doc for vendor tuples mengdong.lin
2016-03-24  3:07 ` [PATCH 4/7] topology: ABI - Define types " mengdong.lin
2016-03-24  3:07 ` [PATCH 5/7] topology: Add support for vendor tokens mengdong.lin
2016-03-24  3:07 ` [PATCH 6/7] topology: Add support for parsing vendor tuples mengdong.lin
2016-03-29 14:13   ` Takashi Iwai
2016-03-30  7:15     ` Mengdong Lin
2016-03-24  3:07 ` [PATCH 7/7] topology: Build data objects with tuples mengdong.lin
2016-03-24 11:20 ` [PATCH 0/7] topology: Add support for vendor tuples Mark Brown
2016-03-25  5:39   ` Mengdong Lin
2016-03-28  7:49     ` Mengdong Lin
2016-03-28  7:57       ` Takashi Iwai
2016-03-28  8:56         ` Mengdong Lin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c8d960fe4b38966d873f0f3951aff9879208d112.1458788076.git.mengdong.lin@linux.intel.com \
    --to=mengdong.lin@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=hardik.t.shah@intel.com \
    --cc=liam.r.girdwood@intel.com \
    --cc=mengdong.lin@intel.com \
    --cc=rakesh.a.ughreja@intel.com \
    --cc=subhransu.s.prusty@intel.com \
    --cc=tiwai@suse.de \
    --cc=vinod.koul@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.