diff options
author | Dan Carpenter <[email protected]> | 2020-01-13 16:23:46 +0300 |
---|---|---|
committer | Richard Weinberger <[email protected]> | 2020-01-19 23:23:28 +0100 |
commit | 5d3805af279c93ef49a64701f35254676d709622 (patch) | |
tree | c7fc7a4ac832b81d5e76d360efd7b418d179323d /scripts/gcc-plugins/cyc_complexity_plugin.c | |
parent | ff90bdfb206e49c8b418811efbdd0c77380fa8c2 (diff) |
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 <[email protected]>
Signed-off-by: Richard Weinberger <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/cyc_complexity_plugin.c')
0 files changed, 0 insertions, 0 deletions