summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2014-06-29 21:34:50 +0200
committerSebastian Dröge <sebastian@centricular.com>2014-06-29 21:34:50 +0200
commit426f9e60979ea48bc364e1810a08316541fe57a6 (patch)
tree1dbcc3a877eb30885be92e191fa079633f03f7a1 /gst-libs
parent7f7793ef79adcfaff9c5ad3e593f46213ba11120 (diff)
downloadgstreamer-plugins-bad-426f9e60979ea48bc364e1810a08316541fe57a6.tar.gz
mpegts: Fix memory leaks in the test and the library
Currently uses g_boxed_free() in the unit test, this needs to be fixed properly when cleaning up the API. https://bugzilla.gnome.org/show_bug.cgi?id=730914
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/mpegts/gst-atsc-section.c3
-rw-r--r--gst-libs/gst/mpegts/gst-dvb-descriptor.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/gst-libs/gst/mpegts/gst-atsc-section.c b/gst-libs/gst/mpegts/gst-atsc-section.c
index cff1d1809..fe97cada2 100644
--- a/gst-libs/gst/mpegts/gst-atsc-section.c
+++ b/gst-libs/gst/mpegts/gst-atsc-section.c
@@ -842,6 +842,9 @@ _gst_mpegts_atsc_stt_free (GstMpegtsAtscSTT * stt)
{
if (stt->descriptors)
g_ptr_array_unref (stt->descriptors);
+ if (stt->utc_datetime)
+ gst_date_time_unref (stt->utc_datetime);
+
g_slice_free (GstMpegtsAtscSTT, stt);
}
diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
index 9793de516..9bf6629fa 100644
--- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c
+++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c
@@ -97,7 +97,10 @@ gst_mpegts_descriptor_from_dvb_network_name (const gchar * name)
converted_name = dvb_text_from_utf8 (name, &size);
- g_return_val_if_fail (size < 256, NULL);
+ if (size >= 256) {
+ g_free (converted_name);
+ return NULL;
+ }
if (!converted_name) {
GST_WARNING ("Could not find proper encoding for string `%s`", name);