[Bug 759520] pnmenc: Fix memory leaks/mishandling

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Dec 15 17:47:36 PST 2015


https://bugzilla.gnome.org/show_bug.cgi?id=759520

Vineeth <vineeth.tm at samsung.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|pnmenc: Fix memory leaks    |pnmenc: Fix memory
                   |                            |leaks/mishandling

--- Comment #3 from Vineeth <vineeth.tm at samsung.com> ---
The 2nd patch is to fix the below errors

==19310== Thread 2 videotestsrc0:sr:
==19310== Syscall param writev(vector[...]) points to uninitialised byte(s)
==19310==    at 0x43DAEE3: writev (writev.c:54)
==19310==    by 0x65ACC77: gst_writev (gstelements_private.c:116)
==19310==    by 0x65AD127: gst_writev_buffers (gstelements_private.c:239)
==19310==    by 0x65B4830: gst_file_sink_render_buffers (gstfilesink.c:665)
==19310==    by 0x65B4D68: gst_file_sink_render (gstfilesink.c:731)
==19310==    by 0x655E673: gst_base_sink_chain_unlocked.isra.12
(gstbasesink.c:3532)
==19310==    by 0x65605F7: gst_base_sink_chain_main (gstbasesink.c:3655)
==19310==    by 0x40A2BA7: gst_pad_push_data (gstpad.c:4153)
==19310==    by 0x40AB866: gst_pad_push (gstpad.c:4524)
==19310==    by 0x4CBD9CE: gst_video_encoder_finish_frame
(gstvideoencoder.c:2196)
==19310==    by 0x4175AC7: gst_pnmenc_handle_frame (gstpnmenc.c:283)
==19310==    by 0x4CBC11A: gst_video_encoder_chain (gstvideoencoder.c:1480)
==19310==  Address 0x6380f17 is 311,135 bytes inside a block of size 322,658
alloc'd
==19310==    at 0x402C17C: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==19310==    by 0x421CBE2: g_malloc (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==19310==    by 0x4233281: g_slice_alloc (in
/lib/i386-linux-gnu/libglib-2.0.so.0.4002.0)
==19310==    by 0x405CCB3: _sysmem_new_block (gstallocator.c:414)
==19310==    by 0x405D38A: gst_allocator_alloc (gstallocator.c:311)
==19310==    by 0x40691B5: gst_buffer_new_allocate (gstbuffer.c:755)
==19310==    by 0x4CBCBA5: gst_video_encoder_allocate_output_buffer
(gstvideoencoder.c:1789)
==19310==    by 0x4175960: gst_pnmenc_handle_frame (gstpnmenc.c:212)
==19310==    by 0x4CBC11A: gst_video_encoder_chain (gstvideoencoder.c:1480)
==19310==    by 0x40A2BA7: gst_pad_push_data (gstpad.c:4153)
==19310==    by 0x40AB866: gst_pad_push (gstpad.c:4524)
==19310==    by 0x656F1A5: gst_base_transform_chain (gstbasetransform.c:2369)


This happens because, header length is also included in the calculations.
Fixing the same

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list