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 760598 - gstnetclientclock: memory leak in handling gst_ntp_packet_receive errors
gstnetclientclock: memory leak in handling gst_ntp_packet_receive errors
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-13 21:32 UTC by Florin Apostol
Modified: 2016-01-13 22:02 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.08 KB, patch)
2016-01-13 21:35 UTC, Florin Apostol
committed Details | Review

Description Florin Apostol 2016-01-13 21:32:55 UTC
In function gst_net_client_internal_clock_thread, error message is not released if gst_ntp_packet_receive returns error:

==20799== 34 (12 direct, 22 indirect) bytes in 1 blocks are definitely lost in loss record 1,812 of 2,836
==20799==    at 0x402E17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==20799==    by 0x42C86B3: g_malloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4400.0)
==20799==    by 0x42DFB7B: g_slice_alloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4400.0)
==20799==    by 0x42ADB37: g_error_new_valist (in /lib/i386-linux-gnu/libglib-2.0.so.0.4400.0)
==20799==    by 0x42ADE5B: g_set_error (in /lib/i386-linux-gnu/libglib-2.0.so.0.4400.0)
==20799==    by 0x4B03450: gst_ntp_packet_new (gstntppacket.c:108)
==20799==    by 0x4B03DB1: gst_ntp_packet_receive (gstntppacket.c:298)
==20799==    by 0x4AF4F9B: gst_net_client_internal_clock_thread (gstnetclientclock.c:714)
==20799==    by 0x42EA409: ??? (in /lib/i386-linux-gnu/libglib-2.0.so.0.4400.0)
==20799==    by 0x43BA1A9: start_thread (pthread_create.c:333)
==20799==    by 0x44BAFDD: clone (clone.S:122)
Comment 1 Florin Apostol 2016-01-13 21:35:03 UTC
Created attachment 318990 [details] [review]
proposed patch
Comment 2 Sebastian Dröge (slomo) 2016-01-13 22:02:40 UTC
commit af330c34c14c3b5d83c93a597334180588db0c46
Author: Florin Apostol <florin.apostol@oregan.net>
Date:   Wed Jan 13 21:32:20 2016 +0000

    netclientclock: Fix GError memory leak in handling NTP response
    
    Error was not released if gst_ntp_packet_receive failed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760598