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 496773 - [rtspsrc] leaks SDP messages
[rtspsrc] leaks SDP messages
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 15:47 UTC by Tommi Myöhänen
Modified: 2007-11-16 09:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes rtspsrc from leaking SDP messages (683 bytes, patch)
2007-11-14 15:47 UTC, Tommi Myöhänen
reviewed Details | Review

Description Tommi Myöhänen 2007-11-14 15:47:08 UTC
==19310== 4,806 (1,525 direct, 3,281 indirect) bytes in 32 blocks are definitely lost in loss record 21 of 28
==19310==    at 0x4020626: malloc (vg_replace_malloc.c:149)
==19310==    by 0x4280E9C: g_malloc (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==19310==    by 0x429138A: g_slice_alloc (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==19310==    by 0x425AC18: g_array_sized_new (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==19310==    by 0x425ACD4: g_array_new (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==19310==    by 0x45FA163: gst_sdp_message_init (gstsdpmessage.c:240)
==19310==    by 0x4833C58: gst_rtspsrc_open (gstrtspsrc.c:3818)
==19310==    by 0x483953A: gst_rtspsrc_change_state (gstrtspsrc.c:4476)
==19310==    by 0x4058DDF: gst_element_change_state (gstelement.c:2362)
==19310==    by 0x4058A2B: gst_element_continue_state (gstelement.c:2077)
==19310==    by 0x4058EC8: gst_element_change_state (gstelement.c:2406)
==19310==    by 0x4059475: gst_element_set_state_func (gstelement.c:2312)

SDP messages are parsed, but not freed. Attached patch fixes this.
Comment 1 Tommi Myöhänen 2007-11-14 15:47:42 UTC
Created attachment 99089 [details] [review]
Patch that fixes rtspsrc from leaking SDP messages
Comment 2 Tim-Philipp Müller 2007-11-14 20:35:48 UTC
That patch doesn't look right, the message hasn't been allocated dynamically but sits on the stack, gst_sdp_message_uninit() should be used instead as far as I can tell:

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

        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_open):
          Don't leak sdp message contents (fixes #496773).

        * gst/udp/gstudpsink.c: (gst_udpsink_finalize):
          Don't leak URI string.

Please re-open if this is incorrect.
Comment 3 Tommi Myöhänen 2007-11-16 09:43:44 UTC
Oh yes, it needs to be gst_sdp_message_uninit(). My mistake. Your fix is correct!