From: Wei Yongjun Date: Mon, 8 Oct 2012 02:35:46 +0000 (+0800) Subject: serial: vt8500: fix possible memory leak in vt8500_serial_probe() X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~83^2~120 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59c2e855e43735f4ab93b8b8db96206219f6c1d4;p=pandora-kernel.git serial: vt8500: fix possible memory leak in vt8500_serial_probe() vt8500_port is malloced in vt8500_serial_probe() and should be freed before leaving from the error handling cases, otherwise it will cause memory leak. Fix it by move the allocation of vt8500_port after those test. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun Acked-by: Tony Prisk Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed