GNOME Bugzilla – Bug 623172
[jpegdec] leak in unit test
Last modified: 2010-07-02 17:17:04 UTC
~/gst/git/gst-plugins-good/tests/check $ make pipelines/simple-launch-lines.valgrind ... ==4143== 59,984 bytes in 5 blocks are definitely lost in loss record 2,503 of 2,506 ==4143== at 0x4C244E8: malloc (vg_replace_malloc.c:236) ==4143== by 0x6185504: g_malloc (gmem.c:132) ==4143== by 0x85EAF4B: gst_adapter_take (gstadapter.c:586) ==4143== by 0x8A78E82: gst_jpeg_dec_fill_input_buffer (gstjpegdec.c:218) ==4143== by 0x8A7A51E: gst_jpeg_dec_chain (gstjpegdec.c:1193) ==4143== by 0x5093F8C: gst_pad_chain_data_unchecked (gstpad.c:4176) ==4143== by 0x509484D: gst_pad_push_data (gstpad.c:4405) ==4143== by 0x8A77577: gst_jpegenc_term_destination (gstjpegenc.c:251) ==4143== by 0x8E90C2E: jpeg_finish_compress (jcapimin.c:178) ==4143== by 0x8A7843C: gst_jpegenc_chain (gstjpegenc.c:631) ==4143== by 0x5093F8C: gst_pad_chain_data_unchecked (gstpad.c:4176) ==4143== by 0x509484D: gst_pad_push_data (gstpad.c:4405) ==4143== by 0x85FD660: gst_base_src_loop (gstbasesrc.c:2487) ==4143== by 0x50BDAEA: gst_task_func (gsttask.c:271) ==4143== by 0x61A752E: g_thread_pool_thread_proxy (gthreadpool.c:315) ==4143== by 0x61A56E3: g_thread_create_proxy (gthread.c:1893) ==4143== by 0x64208B9: start_thread (pthread_create.c:300) ==4143==
Created attachment 164928 [details] [review] tentative patch Possible patch. Not very elegant. Maybe there's a better way or I misread the code.
Comment on attachment 164928 [details] [review] tentative patch Looks good to me, might not be optimal but it's correct at least. This can still be improved later
commit 7cbfe3eae1c5daf7817a76e787c0ef3a63b26f21 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Tue Jun 29 23:18:23 2010 +0100 jpegdec: fix memory leak Don't leak result of gst_adapter_take(). There are most likely smarter things we can do, but let's keep things simple for the release. Fixes #623172.