GNOME Bugzilla – Bug 759518
yadif: Fix memory leak and mishandling.
Last modified: 2015-12-16 08:35:50 UTC
This bug deals with memory leaks/mishandling in yadif plugin.
Created attachment 317461 [details] [review] Fix gvalue memory leak When testing the example pipeline of yadif with valgrind, found the below memory leak ==11656== Thread 1: ==11656== 112 bytes in 4 blocks are definitely lost in loss record 2,187 of 2,393 ==11656== at 0x402C17C: malloc (in /usr/lib/valgrind/vgpreload_memcheck-x86-linux.so) ==11656== by 0x421CBE2: g_malloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0) ==11656== by 0x4233281: g_slice_alloc (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0) ==11656== by 0x41E9219: g_array_sized_new (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0) ==11656== by 0x41E934F: g_array_new (in /lib/i386-linux-gnu/libglib-2.0.so.0.4002.0) ==11656== by 0x40EBF9A: gst_value_init_list_or_array (gstvalue.c:284) ==11656== by 0x41B1B7D: g_value_reset (in /usr/lib/i386-linux-gnu/libgobject-2.0.so.0.4002.0) ==11656== by 0x41741A3: gst_yadif_transform_caps (gstyadif.c:246) ==11656== by 0x616CA1C: gst_base_transform_transform_caps (gstbasetransform.c:536) ==11656== by 0x6171CFA: gst_base_transform_default_query (gstbasetransform.c:757) ==11656== by 0x616EF5B: gst_base_transform_query (gstbasetransform.c:1622) ==11656== by 0x40A97F9: gst_pad_query (gstpad.c:3898)
Created attachment 317462 [details] [review] vf_yadif: Fix illegal memory access. When testing yadif plugin, found the below memory mishandling ==12206== Conditional jump or move depends on uninitialised value(s) ==12206== at 0x4174BA5: yadif_filter (vf_yadif.c:98) ==12206== by 0x4174628: gst_yadif_transform (gstyadif.c:318) ==12206== by 0x656C5B6: default_generate_output (gstbasetransform.c:2180) ==12206== by 0x656F08C: gst_base_transform_chain (gstbasetransform.c:2333) ==12206== by 0x40A2BA7: gst_pad_push_data (gstpad.c:4153) ==12206== by 0x40AB866: gst_pad_push (gstpad.c:4524) ==12206== by 0x416EB99: gst_interlace_chain (gstinterlace.c:780) ==12206== by 0x40A2BA7: gst_pad_push_data (gstpad.c:4153) ==12206== by 0x40AB866: gst_pad_push (gstpad.c:4524) ==12206== by 0x65675A2: gst_base_src_loop (gstbasesrc.c:2845) ==12206== by 0x40D9EA8: gst_task_func (gsttask.c:331) ==12206== by 0x40DB04E: default_func (gsttaskpool.c:68)
commit 50978ccd1ae2e4055d40112aa4e019b48f1952eb Author: Vineeth TM <vineeth.tm@samsung.com> Date: Wed Dec 16 08:25:19 2015 +0900 yadif: Fix illegal memory access When applying the spatial prediction, there is an illegal access of -1 index of array. Hence adding a condition to avoid this. https://bugzilla.gnome.org/show_bug.cgi?id=759518 commit eb7deb44181ed3bebc57de32ab43119add9633e8 Author: Vineeth TM <vineeth.tm@samsung.com> Date: Wed Dec 16 08:22:00 2015 +0900 yadif: Fix gvalue memory leak gvalue variable should be unset instead of reset. https://bugzilla.gnome.org/show_bug.cgi?id=759518