GNOME Bugzilla – Bug 686725
gst-rtsp-server rtspclient leaks addresses when clients attach...
Last modified: 2014-02-25 22:28:44 UTC
When trying to run gst-rtsp-server in valgrind using GST_CHECKS=test_describe I noticed the following leak: Running suite(s): rtspserver ==8198== 108 (56 direct, 52 indirect) bytes in 1 blocks are definitely lost in loss record 3,020 of 3,426 ==8198== at 0x4C2A03B: malloc (vg_replace_malloc.c:267) ==8198== by 0x6C80CA7: standard_malloc (gmem.c:85) ==8198== by 0x6C80D30: g_malloc (gmem.c:159) ==8198== by 0x6C98B21: g_slice_alloc (gslice.c:1007) ==8198== by 0x6C98B60: g_slice_alloc0 (gslice.c:1033) ==8198== by 0x63F5667: g_type_create_instance (gtype.c:1872) ==8198== by 0x63DC65F: g_object_constructor (gobject.c:1849) ==8198== by 0x63DBE77: g_object_newv (gobject.c:1713) ==8198== by 0x63DC5F0: g_object_new_valist (gobject.c:1830) ==8198== by 0x63DB88B: g_object_new (gobject.c:1545) ==8198== by 0x57CEC4F: g_inet_socket_address_new (ginetsocketaddress.c:340) ==8198== by 0x57F02F6: g_socket_address_new_from_native (gsocketaddress.c:231) ==8198== by 0x57ECC6A: g_socket_get_remote_address (gsocket.c:1767) ==8198== by 0x534B362: gst_rtsp_connection_accept (gstrtspconnection.c:312) ==8198== by 0x4E605BB: gst_rtsp_client_accept (rtsp-client.c:2162) ==8198== by 0x4E63D5C: default_accept_client (rtsp-server.c:803) ==8198== by 0x4E641A3: gst_rtsp_server_io_func (rtsp-server.c:905) ==8198== by 0x57EE877: socket_source_dispatch (gsocket.c:3168) ==8198== by 0x6C78B28: g_main_dispatch (gmain.c:2539) ==8198== by 0x6C797ED: g_main_context_dispatch (gmain.c:3075) ==8198== 100%: Checks: 1, Failures: 0, Errors: 0 make: *** [gst/rtspserver.valgrind] Error 1 This due to an omission when gst-rtsp-server was ported to gio back in march 2012 where the remote address of the server that the client connected to is not unreffed after having been used. The attached patch fixes this and fixes the spelling typo.
Created attachment 227090 [details] [review] Proposed patch for memory leak.
Thanks, pushed! commit 0de6262dc4f816c69d2a768068fd548c923cb61c Author: Sebastian Rasmussen <sebrn@axis.com> Date: Tue Oct 23 22:11:17 2012 +0200 rtsp-client: Unref server address clients connected to Fixes https://bugzilla.gnome.org/show_bug.cgi?id=686725