[Bug 760982] New: adaptivedemux: memory leak of stream->internal_pad

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Fri Jan 22 03:24:59 PST 2016


https://bugzilla.gnome.org/show_bug.cgi?id=760982

            Bug ID: 760982
           Summary: adaptivedemux: memory leak of stream->internal_pad
    Classification: Platform
           Product: GStreamer
           Version: git master
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gst-plugins-bad
          Assignee: gstreamer-bugs at lists.freedesktop.org
          Reporter: bugzilla at ashley-family.net
        QA Contact: gstreamer-bugs at lists.freedesktop.org
     GNOME version: ---

The function gst_adaptive_demux_stream_update_source() function creates a new
GstPad called internal_pad. This pad is not freed when releasing the stream.
You can reproduce this by running the dash_demux test under Valgrind.

==2414== 930 (528 direct, 402 indirect) bytes in 1 blocks are definitely lost
in loss record 2,109 of 2,139
==2414==    at 0x5619493: g_type_create_instance (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.1)
==2414==    by 0x55FB38A: ??? (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.1)
==2414==    by 0x55FD224: g_object_new_valist (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.1)
==2414==    by 0x55FD590: g_object_new (in
/usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0.4600.1)
==2414==    by 0xA4F8E72: gst_adaptive_demux_stream_update_source
(gstadaptivedemux.c:2292)
==2414==    by 0xA4F8E72: gst_adaptive_demux_stream_download_uri
(gstadaptivedemux.c:2326)
==2414==    by 0xA4FA16E: gst_adaptive_demux_stream_download_header_fragment
(gstadaptivedemux.c:2451)
==2414==    by 0xA4FA16E: gst_adaptive_demux_stream_download_fragment
(gstadaptivedemux.c:2495)
==2414==    by 0xA4FA16E: gst_adaptive_demux_stream_download_loop
(gstadaptivedemux.c:2738)
==2414==    by 0x535D550: gst_task_func (gsttask.c:331)
==2414==    by 0x58AA2FD: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.1)
==2414==    by 0x58A9964: ??? (in
/lib/x86_64-linux-gnu/libglib-2.0.so.0.4600.1)
==2414==    by 0x5D5D6A9: start_thread (pthread_create.c:333)

This code was added in commit b7a0be23c6865286674ecac127bc4a1603437ee9
(https://bugzilla.gnome.org/show_bug.cgi?id=757951).

Adding a free of internal_pad in gst_adaptive_demux_stream_free() does not work
because the internal_pad has adaptivedemux set as its parent. I also tried
removing the call to set the pad's parent, but that didn't work because that
ended up with the chain function being called with freed data.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list