GNOME Bugzilla – Bug 775888
flxdec: memory leaks in gst_flxdec_chain
Last modified: 2016-12-13 09:46:00 UTC
This file causes a memleak with G_SLICE=always-malloc : samples.mplayerhq.hu/ffmpeg-bugs/roundup/issue2520/fli_invalid_framesize.fli ASAN error: ==8809==ERROR: LeakSanitizer: detected memory leaks Direct leak of 544 byte(s) in 2 object(s) allocated from: #0 0x4d4e38 in malloc (/usr/bin/gst-discoverer-1.0+0x4d4e38) #1 0x7f84a258bc98 in g_malloc /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gmem.c:94 #2 0x7f84a25a3d7f in g_slice_alloc /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gslice.c:1025 #3 0x7f84a31f2d3b in gst_buffer_new /f/gstreamer/gstreamer/gst/gstbuffer.c:797:12 #4 0x7f84a31f2d3b in gst_buffer_new_wrapped_full /f/gstreamer/gstreamer/gst/gstbuffer.c:940 #5 0x7f84a31f3016 in gst_buffer_new_wrapped /f/gstreamer/gstreamer/gst/gstbuffer.c:966:10 #6 0x7f84a37fbf32 in gst_adapter_get_buffer /f/gstreamer/gstreamer/libs/gst/base/gstadapter.c:1013:12 #7 0x7f84961202f1 in gst_flxdec_chain /f/gstreamer/gst-plugins-good/gst/flx/gstflxdec.c:717:11 #8 0x7f84a32e64c7 in gst_pad_chain_data_unchecked /f/gstreamer/gstreamer/gst/gstpad.c:4203:11 #9 0x7f84a32e9c97 in gst_pad_push_data /f/gstreamer/gstreamer/gst/gstpad.c:4455:9 #10 0x7f84a32e930f in gst_pad_push /f/gstreamer/gstreamer/gst/gstpad.c:4574:9 #11 0x7f8497af9bb9 in gst_type_find_element_loop /f/gstreamer/gstreamer/plugins/elements/gsttypefindelement.c:1180:11 #12 0x7f84a33b0a03 in gst_task_func /f/gstreamer/gstreamer/gst/gsttask.c:334:5 #13 0x7f84a25ae857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307 #14 0x7f84a25adec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784 #15 0x7f84a202a453 in start_thread (/lib64/libpthread.so.0+0x7453) #16 0x7f84a1b5a5dc in clone (/lib64/libc.so.6+0xe75dc) Indirect leak of 20224 byte(s) in 2 object(s) allocated from: #0 0x4d4e38 in malloc (/usr/bin/gst-discoverer-1.0+0x4d4e38) #1 0x7f84a258bc98 in g_malloc /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gmem.c:94 #2 0x7f84a37fac06 in gst_adapter_get_internal /f/gstreamer/gstreamer/libs/gst/base/gstadapter.c:737:12 #3 0x7f84a37fbf27 in gst_adapter_get_buffer /f/gstreamer/gstreamer/libs/gst/base/gstadapter.c:1011:10 #4 0x7f84961202f1 in gst_flxdec_chain /f/gstreamer/gst-plugins-good/gst/flx/gstflxdec.c:717:11 #5 0x7f84a32e64c7 in gst_pad_chain_data_unchecked /f/gstreamer/gstreamer/gst/gstpad.c:4203:11 #6 0x7f84a32e9c97 in gst_pad_push_data /f/gstreamer/gstreamer/gst/gstpad.c:4455:9 #7 0x7f84a32e930f in gst_pad_push /f/gstreamer/gstreamer/gst/gstpad.c:4574:9 #8 0x7f8497af9bb9 in gst_type_find_element_loop /f/gstreamer/gstreamer/plugins/elements/gsttypefindelement.c:1180:11 #9 0x7f84a33b0a03 in gst_task_func /f/gstreamer/gstreamer/gst/gsttask.c:334:5 #10 0x7f84a25ae857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307 #11 0x7f84a25adec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784 #12 0x7f84a202a453 in start_thread (/lib64/libpthread.so.0+0x7453) #13 0x7f84a1b5a5dc in clone (/lib64/libc.so.6+0xe75dc) Indirect leak of 288 byte(s) in 2 object(s) allocated from: #0 0x4d4e38 in malloc (/usr/bin/gst-discoverer-1.0+0x4d4e38) #1 0x7f84a258bc98 in g_malloc /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gmem.c:94 #2 0x7f84a25a3d7f in g_slice_alloc /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gslice.c:1025 #3 0x7f84a31cc8fa in _sysmem_new /f/gstreamer/gstreamer/gst/gstallocator.c:393:9 #4 0x7f84a31cc8fa in gst_memory_new_wrapped /f/gstreamer/gstreamer/gst/gstallocator.c:643 #5 0x7f84a31f2e74 in gst_buffer_new_wrapped_full /f/gstreamer/gstreamer/gst/gstbuffer.c:942:7 #6 0x7f84a31f3016 in gst_buffer_new_wrapped /f/gstreamer/gstreamer/gst/gstbuffer.c:966:10 #7 0x7f84a37fbf32 in gst_adapter_get_buffer /f/gstreamer/gstreamer/libs/gst/base/gstadapter.c:1013:12 #8 0x7f84961202f1 in gst_flxdec_chain /f/gstreamer/gst-plugins-good/gst/flx/gstflxdec.c:717:11 #9 0x7f84a32e64c7 in gst_pad_chain_data_unchecked /f/gstreamer/gstreamer/gst/gstpad.c:4203:11 #10 0x7f84a32e9c97 in gst_pad_push_data /f/gstreamer/gstreamer/gst/gstpad.c:4455:9 #11 0x7f84a32e930f in gst_pad_push /f/gstreamer/gstreamer/gst/gstpad.c:4574:9 #12 0x7f8497af9bb9 in gst_type_find_element_loop /f/gstreamer/gstreamer/plugins/elements/gsttypefindelement.c:1180:11 #13 0x7f84a33b0a03 in gst_task_func /f/gstreamer/gstreamer/gst/gsttask.c:334:5 #14 0x7f84a25ae857 in g_thread_pool_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthreadpool.c:307 #15 0x7f84a25adec4 in g_thread_proxy /var/tmp/portage/dev-libs/glib-2.50.2/work/glib-2.50.2/glib/gthread.c:784 #16 0x7f84a202a453 in start_thread (/lib64/libpthread.so.0+0x7453) #17 0x7f84a1b5a5dc in clone (/lib64/libc.so.6+0xe75dc) SUMMARY: AddressSanitizer: 21056 byte(s) leaked in 6 allocation(s).
commit a08e72547dc1ec4d234f0be598a7c9c135188511 Author: Sebastian Dröge <sebastian@centricular.com> Date: Fri Dec 9 17:49:40 2016 +0200 flxdec: Unref and unmap buffers in all code paths as needed https://bugzilla.gnome.org/show_bug.cgi?id=775888