[Bug 733964] New: memory leak in gstplaybin2
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Wed Jul 30 01:34:14 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=733964
GStreamer | gst-plugins-base | 1.2.3
Summary: memory leak in gstplaybin2
Classification: Platform
Product: GStreamer
Version: 1.2.3
OS/Version: Linux
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-base
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: mingke.wang at freescale.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
Created an attachment (id=282002)
--> (https://bugzilla.gnome.org/attachment.cgi?id=282002)
patch for gstplaybin2 memory leak
I think there is a memory leak in gstplaybin2.c
when I checked the memory with valgrind, I got following:
==1219== 168 (72 direct, 96 indirect) bytes in 6 blocks are definitely lost in
loss record 5,332 of 5,578
==1219== at 0x4834024: malloc (vg_replace_malloc.c:291)
==1219== by 0x4BDC9F7: g_malloc (gmem.c:104)
==1219== by 0x4BF3D43: g_slice_alloc (gslice.c:1016)
==1219== by 0x4BD32EF: g_list_append (glist.c:232)
==1219== by 0x4BE766F: g_queue_push_tail (gqueue.c:419)
==1219== by 0x4A06FC3: gst_element_factory_list_filter
(gstelementfactory.c:862)
==1219== by 0x5105A73: autoplug_factories_cb (gstplaybin2.c:3938)
==1219== by 0x4B86B47: ffi_call_VFP (sysv.S:391)
in file gstplaybin2.c line 3974:
factory_list = create_decoders_list (factory_list, *ave_list);
this line reset factory_list,
so gst_plugin_feature_list_free (factory_list); at the end of function will
free the list which isn't the original list returned by
gst_element_factory_list_filter() at line 3938.
that may cause some nodes in the original list can't be freed.
I made rough change to just record the original list and then free it at the
end.
with the changes in the attachment diff, the memory leak gone and valgrind
check can be satisfied.
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- 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