diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2020-01-13 16:23:46 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-02-11 04:34:14 -0800 |
| commit | d9e9451c8ff79fd92b0b83f935a1450503529bd1 (patch) | |
| tree | 20c12d0fb3eaf9cdc39283fe0de977908fa7220a /include | |
| parent | 5fe3a95d2b094c778db751528f78f362287fa378 (diff) | |
ubi: Fix an error pointer dereference in error handling code
commit 5d3805af279c93ef49a64701f35254676d709622 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
