[gstreamer-bugs] [Bug 514573] New: multipartmux memory leak
GStreamer (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Tue Feb 5 08:56:38 PST 2008
If you have any questions why you received this email, please see the text at
the end of this email. Replies to this email are NOT read, please see the text
at the end of this email. You can add comments to this bug at:
http://bugzilla.gnome.org/show_bug.cgi?id=514573
GStreamer | gst-plugins-good | Ver: 0.10.6
Summary: multipartmux memory leak
Product: GStreamer
Version: 0.10.6
Platform: Other
OS/Version: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: orjanf at axis.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME version: Unspecified
GNOME milestone: Unspecified
Please describe the problem:
In gst_multipart_mux_collected, caps are allocated but not unreffed after
setting them on the pad (using gst_pad_set_caps), which introduces a memory
leak of the caps.
Steps to reproduce:
Custom code, haven't been able to repeat with valgrind + gst-launch.
Actual results:
=14985== 191 (32 direct, 159 indirect) bytes in 1 blocks are definitely lost in
loss record 3,795 of 3,920
==14985== at 0x401C38B: malloc (vg_replace_malloc.c:149)
==14985== by 0x4375915: g_malloc (gmem.c:131)
==14985== by 0x438A752: g_slice_alloc (gslice.c:824)
==14985== by 0x41482A1: gst_caps_new_empty (gstcaps.c:142)
==14985== by 0x4148470: gst_caps_new_simple (gstcaps.c:194)
==14985== by 0x5CEA7D5: gst_multipart_mux_collected (multipartmux.c:485)
==14985== by 0x4069C3B: gst_collect_pads_check_collected
(gstcollectpads.c:967)
==14985== by 0x406B47B: gst_collect_pads_chain (gstcollectpads.c:1176)
==14985== by 0x41AA0DB: gst_pad_chain_unchecked (gstpad.c:3518)
==14985== by 0x41AB26D: gst_pad_push (gstpad.c:3686)
==14985== by 0x405414B: gst_base_src_loop (gstbasesrc.c:2111)
==14985== by 0x41EBB1E: gst_task_func (gsttask.c:192)
==14985== by 0x4393306: g_thread_pool_thread_proxy (gthreadpool.c:265)
==14985== by 0x439177E: g_thread_create_proxy (gthread.c:635)
==14985== by 0x4402C50: pthread_start_thread (manager.c:310)
==14985== by 0x4509419: clone (clone.S:119)
Expected results:
No leak.
Does this happen every time?
Yes
Other information:
Patch suggestion:
- if (!gst_pad_set_caps (mux->srcpad, newcaps))
+ if (!gst_pad_set_caps (mux->srcpad, newcaps)) {
+ gst_caps_unref (newcaps);
goto nego_error;
+ }
+ gst_caps_unref (newcaps);
mux->negotiated = TRUE;
}
--
See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received
this email, why you can't respond via email, how to stop receiving
emails (or reduce the number you receive), and how to contact someone
if you are having problems with the system.
You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=514573.
More information about the Gstreamer-bugs
mailing list