GNOME Bugzilla – Bug 759519
gdppay: Fix buffer memory leak
Last modified: 2015-12-16 08:43:08 UTC
Fix memory leak ==13921== 305 (160 direct, 145 indirect) bytes in 1 blocks are definitely lost in loss record 1,909 of 1,944 ==13921== at 0x402C17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==13921== by 0x421CBE2: g_malloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0) ==13921== by 0x4233281: g_slice_alloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0) ==13921== by 0x406807B: gst_buffer_new (gstbuffer.c:714) ==13921== by 0x416E784: gst_dp_payload_event (dataprotocol.c:286) ==13921== by 0x416FDA0: gst_gdp_pay_sink_event (gstgdppay.c:212) ==13921== by 0x40A149D: gst_pad_send_event_unchecked (gstpad.c:5552) ==13921== by 0x40A17E6: gst_pad_push_event_unchecked (gstpad.c:5210) ==13921== by 0x40A1E39: push_sticky (gstpad.c:3755) ==13921== by 0x409FB96: events_foreach (gstpad.c:598) ==13921== by 0x40ACDE6: gst_pad_push_event (gstpad.c:3812) ==13921== by 0x6167EDA: gst_base_src_loop (gstbasesrc.c:2929)
Created attachment 317464 [details] [review] fix memory leak.
commit 1b2a9a9c844904840aac31e9451840b5f5c0cf80 Author: Vineeth TM <vineeth.tm@samsung.com> Date: Wed Dec 16 08:52:12 2015 +0900 gdppay: Fix buffer memory leak outbuffer being allocated is not being pushed to queue for EOS event and hence should be freed. https://bugzilla.gnome.org/show_bug.cgi?id=759519
Review of attachment 317464 [details] [review]: ::: gst/gdp/gstgdppay.c @@ +579,3 @@ goto push_error; + } else + gst_buffer_unref (outbuffer); Please add some {} brackets around such things :) At least if the other cases are multiple lines