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 755530 - glib-networking memleak
glib-networking memleak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: cerbero
git master
Other Linux
: Normal normal
: 1.6.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on: 755535
Blocks:
 
 
Reported: 2015-09-24 10:50 UTC by Nicola
Modified: 2015-09-24 12:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (2.38 KB, patch)
2015-09-24 10:50 UTC, Nicola
none Details | Review
updated patch (2.36 KB, patch)
2015-09-24 12:03 UTC, Nicola
committed Details | Review

Description Nicola 2015-09-24 10:50:25 UTC
Created attachment 312038 [details] [review]
fix

valgrind show this leak using souphttpsrc and https

==9531== 38 bytes in 1 blocks are definitely lost in loss record 2,209 of 3,855
==9531== at 0x4C29E6F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9531== by 0x5AF91A9: g_malloc (gmem.c:97)
==9531== by 0x5B11B2E: g_strdup (gstrfuncs.c:356)
==9531== by 0xAF68670: g_tls_connection_gnutls_init_priorities (gtlsconnection-gnutls.c:246)
==9531== by 0xAF68670: g_tls_connection_gnutls_get_type (gtlsconnection-gnutls.c:72)
==9531== by 0xAF66104: g_tls_client_connection_gnutls_get_type (gtlsclientconnection-gnutls.c:51)
==9531== by 0x8CE05A6: soup_socket_setup_ssl (soup-socket.c:1352)
==9531== by 0x8CE170F: soup_socket_handshake_async (soup-socket.c:1499)
==9531== by 0x8CB9A05: socket_connect_complete (soup-connection.c:381)
==9531== by 0x95F2D12: g_task_return_now (gtask.c:1088)
==9531== by 0x95F338D: g_task_return (gtask.c:1146)
==9531== by 0x8CE02DC: async_connected (soup-socket.c:922)
==9531== by 0x95F2D12: g_task_return_now (gtask.c:1088)
==9531== by 0x95F338D: g_task_return (gtask.c:1146)
==9531== by 0x95EA349: g_socket_client_async_connect_complete (gsocketclient.c:1369)
==9531== by 0x95EA6A7: g_socket_client_connected_callback (gsocketclient.c:1519)
==9531== by 0x95F2D12: g_task_return_now (gtask.c:1088)
==9531== by 0x95F338D: g_task_return (gtask.c:1146)
==9531== by 0x95EBDCC: g_socket_connection_connect_callback (gsocketconnection.c:236)
==9531== by 0x95E4190: socket_source_dispatch (gsocket.c:3276)
==9531== by 0x5AF37A9: g_main_dispatch (gmain.c:3122)
==9531== by 0x5AF37A9: g_main_context_dispatch (gmain.c:3737)

fix attached
Comment 1 Sebastian Dröge (slomo) 2015-09-24 10:51:33 UTC
Did you report that against glib-networking too? What's the bug number?
Comment 2 Nicola 2015-09-24 11:00:51 UTC
(In reply to Sebastian Dröge (slomo) from comment #1)
> Did you report that against glib-networking too? What's the bug number?

no I reported here only for now, current glib-networking version is 2.46 and the code is different from 2.44. 

I tested 2.44 shipped with gstreamer prerelease and I found this leak, do you think I have to report a bug for an older glib-networking version?

I did no test with 2.46
Comment 3 Sebastian Dröge (slomo) 2015-09-24 11:10:44 UTC
Yes, we're not going to integrate this patch unless it is at least reported against glib-networking too. Also check if the problem still exists in 2.46.
Comment 4 Nicola 2015-09-24 11:27:29 UTC
reported against glib-networking

https://bugzilla.gnome.org/show_bug.cgi?id=755535

for now I have no time to test if the bug is already fixed in 2.46, sorry
Comment 5 Emmanuele Bassi (:ebassi) 2015-09-24 11:56:55 UTC
The issue was fixed in glib-networking 2.46, and I just cherry-picked the commit to the glib-2-44 branch.
Comment 6 Sebastian Dröge (slomo) 2015-09-24 12:03:15 UTC
Comment on attachment 312038 [details] [review]
fix

Merged, and also applied to glib-networking-static... and updated with the patch that is upstream.
Comment 7 Nicola 2015-09-24 12:03:43 UTC
Created attachment 312048 [details] [review]
updated patch
Comment 8 Sebastian Dröge (slomo) 2015-09-24 12:04:10 UTC
commit 6298777a2d4d7fab33b60ee87274804b9ab31f4f
Author: Nicola Murino <nicola.murino@gmail.com>
Date:   Thu Sep 24 12:47:48 2015 +0200

    glib-networking: fix memleak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755530