GNOME Bugzilla – Bug 760598
gstnetclientclock: memory leak in handling gst_ntp_packet_receive errors
Last modified: 2016-01-13 22:02:52 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)
Created attachment 318990 [details] [review] proposed patch
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