]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
UBI: Fix double free after do_sync_erase()
authorRichard Weinberger <richard@nod.at>
Thu, 6 Nov 2014 15:47:49 +0000 (16:47 +0100)
committerJiri Slaby <jslaby@suse.cz>
Mon, 26 Jan 2015 13:38:47 +0000 (14:38 +0100)
commitd97a9dc7ab8bcad943464de5d27e1341bad3ccbb
treeffaf3fe3e5cb09d5a19d18ba12e3e2e5293ad61e
parentb4725475530d091cfac701c3d4574b04a6eed21b
UBI: Fix double free after do_sync_erase()

commit aa5ad3b6eb8feb2399a5d26c8fb0060561bb9534 upstream.

If the erase worker is unable to erase a PEB it will
free the ubi_wl_entry itself.
The failing ubi_wl_entry must not free()'d again after
do_sync_erase() returns.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/mtd/ubi/wl.c