diff options
author | Sebastian Dröge <sebastian@centricular.com> | 2014-06-29 21:34:50 +0200 |
---|---|---|
committer | Sebastian Dröge <sebastian@centricular.com> | 2014-06-29 21:34:50 +0200 |
commit | 426f9e60979ea48bc364e1810a08316541fe57a6 (patch) | |
tree | 1dbcc3a877eb30885be92e191fa079633f03f7a1 /gst-libs/gst/mpegts | |
parent | 7f7793ef79adcfaff9c5ad3e593f46213ba11120 (diff) | |
download | gstreamer-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/gst/mpegts')
-rw-r--r-- | gst-libs/gst/mpegts/gst-atsc-section.c | 3 | ||||
-rw-r--r-- | gst-libs/gst/mpegts/gst-dvb-descriptor.c | 5 |
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); |