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 496752 - [rtspsrc] leaks memory
[rtspsrc] leaks memory
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.7
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-11-14 14:17 UTC by Tommi Myöhänen
Modified: 2007-11-14 15:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for rtspsrc event and GstRTSPTimeRange -leaks (653 bytes, patch)
2007-11-14 14:22 UTC, Tommi Myöhänen
committed Details | Review

Description Tommi Myöhänen 2007-11-14 14:17:42 UTC
RTSP source element leaks events and GstRTSPTimeRange objects:

Events leak:

==23006== 35,012 (3,436 direct, 31,576 indirect) bytes in 173 blocks are definitely lost in loss record 25 of 32
==23006==    at 0x4021B52: calloc (vg_replace_malloc.c:279)
==23006==    by 0x4280E14: g_malloc0 (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==23006==    by 0x40815CA: gst_structure_id_empty_new_with_size (gststructure.c:115)
==23006==    by 0x4082205: gst_structure_new_valist (gststructure.c:206)
==23006==    by 0x408228E: gst_structure_new (gststructure.c:179)
==23006==    by 0x405DDA0: gst_event_new_qos (gstevent.c:747)
==23006==    by 0x4A0C258: gst_base_sink_render_object (gstbasesink.c:1408)
==23006==    by 0x4A0D2BE: gst_base_sink_queue_object_unlocked (gstbasesink.c:1875)
==23006==    by 0x4A0DC18: gst_base_sink_chain_unlocked (gstbasesink.c:2153)
==23006==    by 0x4A0E096: gst_base_sink_chain (gstbasesink.c:2187)
==23006==    by 0x407306E: gst_pad_chain_unchecked (gstpad.c:3451)
==23006==    by 0x40738E5: gst_pad_push (gstpad.c:3617)


GstRTSPTimeRange object leak:

==14548== 72 bytes in 4 blocks are definitely lost in loss record 5 of 29
==14548==    at 0x4021B52: calloc (vg_replace_malloc.c:279)
==14548==    by 0x4280E14: g_malloc0 (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==14548==    by 0x4A5A086: gst_rtsp_range_parse (gstrtsprange.c:150)
==14548==    by 0x4A33297: gst_rtspsrc_parse_range (gstrtspsrc.c:3690)
==14548==    by 0x4A33C8F: gst_rtspsrc_open (gstrtspsrc.c:3830)
==14548==    by 0x4A394EA: gst_rtspsrc_change_state (gstrtspsrc.c:4474)
==14548==    by 0x4058DDF: gst_element_change_state (gstelement.c:2362)
==14548==    by 0x4058A2B: gst_element_continue_state (gstelement.c:2077)
==14548==    by 0x4058EC8: gst_element_change_state (gstelement.c:2406)
==14548==    by 0x4059475: gst_element_set_state_func (gstelement.c:2312)
==14548==    by 0x4057D24: gst_element_set_state (gstelement.c:2218)
==14548==    by 0x4045B8E: gst_bin_change_state_func (gstbin.c:1953)

Attached patch fixes these leaks.
Comment 1 Tommi Myöhänen 2007-11-14 14:22:47 UTC
Created attachment 99084 [details] [review]
Fix for rtspsrc event and GstRTSPTimeRange -leaks
Comment 2 Tim-Philipp Müller 2007-11-14 15:30:08 UTC
Thanks, applied:

 2007-11-14  Tim-Philipp Müller  <tim at centricular dot net>

        Patch by: Tommi Myöhänen  <ext-tommi dot myohanen at nokia dot com>

        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_handle_src_event),
          (gst_rtspsrc_parse_range):
          Don't leak event, don't leak range (fixes #496752).