From: Richard Weinberger Date: Mon, 30 Jan 2012 17:20:13 +0000 (+0100) Subject: UBI: fix error handling in ubi_scan() X-Git-Tag: v3.4-rc1~119^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a29852be492d61001d86c6ebf5fff9b93d7b4be9;p=pandora-kernel.git UBI: fix error handling in ubi_scan() Two bad things can happen in ubi_scan(): 1. If kmem_cache_create() fails we jump to out_si and call ubi_scan_destroy_si() which calls kmem_cache_destroy(). But si->scan_leb_slab is NULL. 2. If process_eb() fails we jump to out_vidh, call kmem_cache_destroy() and ubi_scan_destroy_si() which calls again kmem_cache_destroy(). Signed-off-by: Richard Weinberger Signed-off-by: Artem Bityutskiy Cc: stable@kernel.org --- Reading git-diff-tree failed