GNOME Bugzilla – Bug 790986
udpsink memory leak in gst_multiudpsink_start
Last modified: 2017-12-08 00:38:40 UTC
Memory leak reported by valgrind ==27726== 144 (40 direct, 104 indirect) bytes in 1 blocks are definitely lost in loss record 8,485 of 8,878 ==27726== at 0x56C0A3A: g_type_create_instance (in /usr/lib64/libgobject-2.0.so.0.4200.2) ==27726== by 0x56A525C: ??? (in /usr/lib64/libgobject-2.0.so.0.4200.2) ==27726== by 0x56A71D3: g_object_new_valist (in /usr/lib64/libgobject-2.0.so.0.4200.2) ==27726== by 0x56A75D0: g_object_new (in /usr/lib64/libgobject-2.0.so.0.4200.2) ==27726== by 0xD9C0E22: gst_multiudpsink_start.5131 (in /usr/lib64/gstreamer-1.0/libgstudp.so) ==27726== by 0x5E47731: gst_base_sink_change_state.5296 (in /usr/lib64/libgstbase-1.0.so.0) ==27726== by 0x54145B7: gst_element_change_state (in /usr/lib64/libgstreamer-1.0.so.0) ==27726== by 0x53F104B: gst_element_set_state_func.13613 (in /usr/lib64/libgstreamer-1.0.so.0) ==27726== by 0x53F03C6: gst_bin_change_state_func.4657 (in /usr/lib64/libgstreamer-1.0.so.0) ==27726== by 0x54145B7: gst_element_change_state (in /usr/lib64/libgstreamer-1.0.so.0) ==27726== by 0x53F104B: gst_element_set_state_func.13613 (in /usr/lib64/libgstreamer-1.0.so.0) ==27726== by 0x40EF2B: gst_sdk_cr_stream (gst_sdk.c:690)
The object GSocketAddress is not released in case of IP v4 socket.
Do you want to provide a patch for this?
I fixed it this way: svn diff Index: gstmultiudpsink.c =================================================================== --- gstmultiudpsink.c (revision 50810) +++ gstmultiudpsink.c (working copy) @@ -1362,6 +1362,7 @@ } g_socket_bind (sink->used_socket, bind_addr, TRUE, &err); + g_object_unref (bind_addr); if (err != NULL) goto bind_error; } else {
Thanks for reporting and providing the diff. Would you mind providing a patch in git format-patch format? Preferably with author and email set so we can track authorship. Thanks!
Pushed: commit 66f253ed9bdfd39d89a68945283dd375c23a106c Author: Alvaro Margulis <alvaro.margulis@cirpack.com> Date: Fri Dec 8 00:31:32 2017 +0000 multiudpsink: fix bind address leak https://bugzilla.gnome.org/show_bug.cgi?id=790986 For future reference: https://gstreamer.freedesktop.org/documentation/contribute/index.html#how-to-submit-patches