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 775472 - matroskademux: memory leak in matroska parser / gst_ebml_read_binary
matroskademux: memory leak in matroska parser / gst_ebml_read_binary
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 1.10.3
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-12-01 14:32 UTC by Hanno Böck
Modified: 2016-12-05 09:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Hanno Böck 2016-12-01 14:32:00 UTC
This file
https://samples.mplayerhq.hu/Matroska/ticket-a_aac.mkv
causes a memory leak with gst-discoverer-1.0.

==9181==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 2050263 byte(s) in 2 object(s) allocated from:
    #0 0x4d4e28 in malloc (/usr/bin/gst-discoverer-1.0+0x4d4e28)
    #1 0x7f989d104aa8 in g_malloc (/usr/lib64/libglib-2.0.so.0+0x4faa8)
    #2 0x7f989d11e637 in g_memdup (/usr/lib64/libglib-2.0.so.0+0x69637)
    #3 0x7f9890c50298 in gst_ebml_read_binary /f/gstreamer/gst-plugins-good/gst/matroska/ebml-read.c:666:13
    #4 0x7f9890cdc1cc in gst_matroska_read_common_parse_attached_file /f/gstreamer/gst-plugins-good/gst/matroska/matroska-read-common.c:577:15
    #5 0x7f9890cdc1cc in gst_matroska_read_common_parse_attachments /f/gstreamer/gst-plugins-good/gst/matroska/matroska-read-common.c:708
    #6 0x7f9890c6a123 in gst_matroska_demux_parse_id /f/gstreamer/gst-plugins-good/gst/matroska/matroska-demux.c:4514:19
    #7 0x7f9890c97376 in gst_matroska_demux_parse_contents_seekentry /f/gstreamer/gst-plugins-good/gst/matroska/matroska-demux.c:4042:15
    #8 0x7f9890c6a8a7 in gst_matroska_demux_parse_contents /f/gstreamer/gst-plugins-good/gst/matroska/matroska-demux.c:4091:15
    #9 0x7f9890c6a8a7 in gst_matroska_demux_parse_id /f/gstreamer/gst-plugins-good/gst/matroska/matroska-demux.c:4544
    #10 0x7f9890c62f1a in gst_matroska_demux_loop /f/gstreamer/gst-plugins-good/gst/matroska/matroska-demux.c:4683:9
    #11 0x7f989df2a5d3 in gst_task_func /f/gstreamer/gstreamer/gst/gsttask.c:334:5
    #12 0x7f989d127627  (/usr/lib64/libglib-2.0.so.0+0x72627)
    #13 0x7f989d126c94  (/usr/lib64/libglib-2.0.so.0+0x71c94)
    #14 0x7f989cba3453 in start_thread (/lib64/libpthread.so.0+0x7453)
    #15 0x7f989c6d35dc in clone (/lib64/libc.so.6+0xe75dc)

SUMMARY: AddressSanitizer: 2050263 byte(s) leaked in 2 allocation(s).
Comment 1 Sebastian Dröge (slomo) 2016-12-01 15:39:32 UTC
commit 7d6cf17498625ef7dd3c3af6e3d789ff51465894
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Thu Dec 1 17:38:33 2016 +0200

    matroskademux: Fix memory leak when parsing attachments
    
    gst_tag_image_data_to_image_sample() does not take ownership of the
    passed memory, so don't set it to NULL to allow us to free it later.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=775472