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 759519 - gdppay: Fix buffer memory leak
gdppay: Fix buffer memory leak
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.7.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-15 23:52 UTC by Vineeth
Modified: 2015-12-16 08:43 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix memory leak. (872 bytes, patch)
2015-12-15 23:54 UTC, Vineeth
committed Details | Review

Description Vineeth 2015-12-15 23:52:39 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)
Comment 1 Vineeth 2015-12-15 23:54:00 UTC
Created attachment 317464 [details] [review]
fix memory leak.
Comment 2 Sebastian Dröge (slomo) 2015-12-16 08:41:46 UTC
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
Comment 3 Sebastian Dröge (slomo) 2015-12-16 08:43:08 UTC
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