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 497007 - [PATCH] rtspsrc leaks RTSP messages in SETUP
[PATCH] rtspsrc leaks RTSP messages in SETUP
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-15 10:03 UTC by Tommi Myöhänen
Modified: 2007-11-15 17:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that fixes RTSP message leak in rtspsrc.c (564 bytes, patch)
2007-11-15 10:05 UTC, Tommi Myöhänen
committed Details | Review

Description Tommi Myöhänen 2007-11-15 10:03:49 UTC
==3797== 612 (143 direct, 469 indirect) bytes in 7 blocks are definitely lost in loss record 13 of 27
==3797==    at 0x4020626: malloc (vg_replace_malloc.c:149)
==3797==    by 0x4280E9C: g_malloc (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==3797==    by 0x4292428: g_strdup (in /targets/OSSO_1.1_X86/usr/lib/libglib-2.0.so.0.1200.12)
==3797==    by 0x4A58CB7: gst_rtsp_message_init_request (gstrtspmessage.c:189)
==3797==    by 0x4A31279: gst_rtspsrc_setup_streams (gstrtspsrc.c:3555)
==3797==    by 0x4A34572: gst_rtspsrc_open (gstrtspsrc.c:3852)
==3797==    by 0x4A3961A: gst_rtspsrc_change_state (gstrtspsrc.c:4486)
==3797==    by 0x4058DDF: gst_element_change_state (gstelement.c:2362)
==3797==    by 0x4058A2B: gst_element_continue_state (gstelement.c:2077)
==3797==    by 0x4058EC8: gst_element_change_state (gstelement.c:2406)
==3797==    by 0x4059475: gst_element_set_state_func (gstelement.c:2312)
==3797==    by 0x4057D24: gst_element_set_state (gstelement.c:2218)

This happens because request and response messages are not unset'd. They contain a g_strdup'ed data that needs to be freed. Attached patch fixes this.
Comment 1 Tommi Myöhänen 2007-11-15 10:05:27 UTC
Created attachment 99132 [details] [review]
Patch that fixes RTSP message leak in rtspsrc.c
Comment 2 Wim Taymans 2007-11-15 17:47:41 UTC
        Patch by: Tommi Myöhänen  <ext-tommi dot myohanen at nokia dot com>

        * gst/rtsp/gstrtspsrc.c: (gst_rtspsrc_setup_streams):
        Fix some more leaks. Fixes #497007.