From 409b9b220d7ed4b2a4bcb987e0d9985888f8ae43 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Sun, 5 Feb 2006 22:44:55 +0000 Subject: [PATCH] ext/vorbis/vorbisenc.c: Don't leak tag names. Original commit message from CVS: * ext/vorbis/vorbisenc.c: (gst_vorbisenc_metadata_set1): Don't leak tag names. --- ChangeLog | 5 +++++ ext/vorbis/vorbisenc.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8113f939d5..1e292d955a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-02-05 Jan Schmidt + + * ext/vorbis/vorbisenc.c: (gst_vorbisenc_metadata_set1): + Don't leak tag names. + 2006-02-05 Tim-Philipp Müller * docs/libs/gst-plugins-base-libs-docs.sgml: diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 2904c8069e..8d4a13c2a4 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -609,7 +609,10 @@ gst_vorbisenc_metadata_set1 (const GstTagList * list, const gchar * tag, vorbisvalue = gst_vorbisenc_get_tag_value (list, tag, i); if (vorbisvalue != NULL) { - vorbis_comment_add_tag (&enc->vc, g_strdup (vorbistag), vorbisvalue); + gchar *tmptag = g_strdup (vorbistag); + + vorbis_comment_add_tag (&enc->vc, tmptag, vorbisvalue); + g_free (tmptag); } } }