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 722145 - tsdemux: fix memleak of PCROffsetCurrent
tsdemux: fix memleak of PCROffsetCurrent
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.3.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-01-14 00:24 UTC by Andrey Utkin
Modified: 2014-01-14 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (808 bytes, patch)
2014-01-14 00:24 UTC, Andrey Utkin
committed Details | Review

Description Andrey Utkin 2014-01-14 00:24:03 UTC
Created attachment 266218 [details] [review]
patch

gst/mpegtsdemux/mpegtspacketizer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gst/mpegtsdemux/mpegtspacketizer.c b/gst/mpegtsdemux/mpegtspacketizer.c
index 261992a..84e1a64 100644
--- a/gst/mpegtsdemux/mpegtspacketizer.c
+++ b/gst/mpegtsdemux/mpegtspacketizer.c
@@ -100,6 +100,7 @@ flush_observations (MpegTSPacketizer2 * packetizer)
   gint i;

   for (i = 0; i < packetizer->lastobsid; i++) {
+    g_slice_free (PCROffsetCurrent, packetizer->observations[i]->current);
     g_free (packetizer->observations[i]);
     packetizer->observations[i] = NULL;
   }
Comment 1 Sebastian Dröge (slomo) 2014-01-14 09:35:36 UTC
commit 4d957e53e4415c72440af0281b4a479101a3dc63
Author: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Date:   Tue Jan 14 02:19:12 2014 +0200

    tsdemux: fix memleak of PCROffsetCurrent
    
    https://bugzilla.gnome.org/show_bug.cgi?id=722145
Comment 2 Andrey Utkin 2014-01-14 13:20:49 UTC
(In reply to comment #1)
> commit 4d957e53e4415c72440af0281b4a479101a3dc63
> Author: Andrey Utkin <andrey.krieger.utkin@gmail.com>
> Date:   Tue Jan 14 02:19:12 2014 +0200
> 
>     tsdemux: fix memleak of PCROffsetCurrent
> 
>     https://bugzilla.gnome.org/show_bug.cgi?id=722145

Thank you for applying Sebastian, but i'm afraid you added a non-NULL-checking condition without actual need: MpegTSPCR structure is allocated in single place in code, and it always unconditionally allocates also PCROffsetCurrent into res->current.