summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Hervey <edward@collabora.com>2013-06-05 13:21:29 +0200
committerEdward Hervey <edward@collabora.com>2013-06-05 13:21:29 +0200
commit824f08d1d8f0c6344f9a836bf8f74efe2a14b838 (patch)
tree1f526c27c24e08b9e2264df8ea8c48d616426271
parentf3bf40e2b01a7bd9342465b7927900c2871f7727 (diff)
mpegtspacketizer: Fix string leak
The description/text get copied in the structure.
-rw-r--r--gst/mpegtsdemux/mpegtspacketizer.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index ce146ccc1..fa0a14410 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -2076,6 +2076,8 @@ mpegts_packetizer_parse_eit (MpegTSPacketizer2 * packetizer,
extended_item = gst_structure_new_id (QUARK_EXTENDED_ITEM,
QUARK_DESCRIPTION, G_TYPE_STRING, description,
QUARK_TEXT, G_TYPE_STRING, text, NULL);
+ g_free (description);
+ g_free (text);
g_value_init (&extended_item_value, GST_TYPE_STRUCTURE);
g_value_take_boxed (&extended_item_value, extended_item);
@@ -3229,6 +3231,8 @@ get_encoding_and_convert (MpegTSPacketizer2 * packetizer, const gchar * text,
iconv, is_multibyte, &error);
if (error != NULL) {
GST_WARNING ("Could not convert string: %s", error->message);
+ if (converted_str)
+ g_free (converted_str);
g_error_free (error);
error = NULL;