diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-01-13 16:23:46 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-01-19 23:23:28 +0100 |
commit | 5d3805af279c93ef49a64701f35254676d709622 (patch) | |
tree | c7fc7a4ac832b81d5e76d360efd7b418d179323d /drivers/rtc | |
parent | ff90bdfb206e49c8b418811efbdd0c77380fa8c2 (diff) | |
download | linux-5d3805af279c93ef49a64701f35254676d709622.tar.bz2 |
ubi: Fix an error pointer dereference in error handling code
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: daef3dd1f0ae ("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>
Diffstat (limited to 'drivers/rtc')
0 files changed, 0 insertions, 0 deletions