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 677466 - gstrtspconnection: GSocket and GSocketAddress leaks
gstrtspconnection: GSocket and GSocketAddress leaks
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.11.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-06-05 12:24 UTC by David Svensson Fors
Modified: 2012-06-06 12:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix memory leaks in gst_rtsp_connection_accept (678 bytes, patch)
2012-06-05 12:24 UTC, David Svensson Fors
none Details | Review

Description David Svensson Fors 2012-06-05 12:24:16 UTC
Created attachment 215640 [details] [review]
Fix memory leaks in gst_rtsp_connection_accept

The GstRTSPConnection created in gst_rtsp_connection_accept keeps two references to the client GSocket, which are unreffed when the connection is freed. The third reference, returned by g_socket_accept, is not unreffed and there is a GSocket leak.

The GSocketAddress reference returned by the call to g_socket_get_remote_address in gst_rtsp_connection_accept is also not unreffed. According to the documentation for g_socket_get_remote_address, it should be unreffed.

I've attached a patch for fixing these problems.
Comment 1 Wim Taymans 2012-06-06 12:54:46 UTC
commit 0b0dde7ce11e15bedaf34aea2df843a5253d1e2f
Author: David Svensson Fors <davidsf at axis.com>
Date:   Wed Jun 6 14:53:43 2012 +0200

    rtsp: don't leak address and socket
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=677466