linux-uconsole/drivers/mtd/ubi
Dan Carpenter d9e9451c8f ubi: Fix an error pointer dereference in error handling code
commit 5d3805af27 upstream.

If "seen_pebs = init_seen(ubi);" fails then "seen_pebs" is an error pointer
and we try to kfree() it which results in an Oops.

This patch re-arranges the error handling so now it only frees things
which have been allocated successfully.

Fixes: daef3dd1f0 ("UBI: Fastmap: Add self check to detect absent PEBs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-11 04:34:14 -08:00
..
attach.c
block.c
build.c ubi: Put MTD device after it is not used 2019-12-05 09:20:10 +01:00
cdev.c ubi: expose the volume CRC check skip flag 2018-08-15 00:25:21 +02:00
debug.c
debug.h
eba.c
fastmap-wl.c
fastmap.c ubi: Fix an error pointer dereference in error handling code 2020-02-11 04:34:14 -08:00
gluebi.c
io.c
kapi.c ubi: Do not drop UBI device reference before using 2019-12-05 09:20:11 +01:00
Kconfig
Makefile
misc.c
ubi-media.h
ubi.h
upd.c
vmt.c ubi: expose the volume CRC check skip flag 2018-08-15 00:25:21 +02:00
vtbl.c
wl.c
wl.h