From: Masami Ichikawa Date: Wed, 23 Apr 2014 14:35:22 +0000 (+0900) Subject: fbcon: Fix memory leak in con2fb_release_oldinfo() X-Git-Tag: omap-for-v3.16/fixes-against-rc1~56^2~24^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a966fbd78683fe4ff7f019fd80fc08d9753880b;p=pandora-kernel.git fbcon: Fix memory leak in con2fb_release_oldinfo() kmemleak reported a memory leak as below. unreferenced object 0xffff8800dab6d8d8 (size 96): comm "swapper/0", pid 1, jiffies 4294877598 (age 38.483s) hex dump (first 32 bytes): 00 00 00 00 00 01 00 00 08 00 00 00 10 00 00 00 ................ 07 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 ................ backtrace: [] kmemleak_alloc+0x4e/0xb0 [] __kmalloc+0x280/0x320 [] soft_cursor+0x231/0x290 [] bit_cursor+0x613/0x650 [] fbcon_cursor+0x13b/0x1c0 [] hide_cursor+0x28/0xa0 [] redraw_screen+0x168/0x240 [] fbcon_prepare_logo+0x381/0x420 [] fbcon_init+0x34e/0x590 [] visual_init+0xb8/0x120 [] do_bind_con_driver+0x163/0x380 [] do_take_over_console+0x114/0x1c0 [] do_fbcon_takeover+0x63/0xd0 [] fbcon_event_notify+0x68d/0x7e0 [] notifier_call_chain+0x4c/0x70 [] __blocking_notifier_call_chain+0x4d/0x70 This memory leak cause is, fbcon_ops's cursor_src is allocated in soft_cursor() but not released in con2fb_release_oldinfo(). so, cursor_src is needed to be released when oldinfo is going to be released. Signed-off-by: Masami Ichikawa Signed-off-by: Tomi Valkeinen --- Reading git-diff-tree failed