GNOME Bugzilla – Bug 722145
tsdemux: fix memleak of PCROffsetCurrent
Last modified: 2014-01-14 13:20:49 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; }
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
(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.