After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732227 - tsdemux: Leaks memory of section data
tsdemux: Leaks memory of section data
Status: RESOLVED INCOMPLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-06-25 11:25 UTC by Sebastian Dröge (slomo)
Modified: 2015-09-04 14:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sebastian Dröge (slomo) 2014-06-25 11:25:41 UTC
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752623

Code is still the same in git master. But a bit difficult to understand because of too many gotos.
Comment 1 Edward Hervey 2014-06-25 12:16:44 UTC
I went through the code again, and the only place that could have leaked something was this:

commit cddabd751c760454915bcd3a485f241939499292
Author: Edward Hervey <bilboed@bilboed.com>
Date:   Wed Jun 25 14:13:55 2014 +0200

    mpegtssection: Free data in error cases
    
    Data is marked as "transfer full", if we have an error we need to
    free it.

diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c
index 5167a39..7f000c4 100644
--- a/gst-libs/gst/mpegts/gstmpegtssection.c
+++ b/gst-libs/gst/mpegts/gstmpegtssection.c
@@ -1223,6 +1223,7 @@ short_packet:
     GST_WARNING
         ("PID 0x%04x section extends past provided data (got:%" G_GSIZE_FORMAT
         ", need:%d)", pid, data_size, section_length + 3);
+    g_free (data);
     return NULL;
   }
 }
Comment 2 Edward Hervey 2014-06-25 12:18:38 UTC
Would be great if the original reporter could provide a way to reproduce the issue, or at least some logs (even just GST_DEBUG=2) to have an idea of where the leak potentially comes from.
Comment 3 Sebastian Dröge (slomo) 2015-09-04 14:00:44 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug report if you can provide the information that was asked for in a previous comment.
Thanks!