Commit 7c735282 authored by Christoph Jaeger's avatar Christoph Jaeger Committed by Greg Kroah-Hartman

drivers: mcb: fix memory leak in chameleon_parse_cells() error path

chameleon_parse_cells() bails out if chameleon descriptor type is
invalid but does not free the storage 'header' points to.
Signed-off-by: default avatarChristoph Jaeger <christophjaeger@linux.com>
Signed-off-by: default avatarJohannes Thumshirn <johannes.thumshirn@men.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 34ec4366
......@@ -141,6 +141,7 @@ int chameleon_parse_cells(struct mcb_bus *bus, phys_addr_t mapbase,
default:
pr_err("Invalid chameleon descriptor type 0x%x\n",
dtype);
kfree(header);
return -EINVAL;
}
num_cells++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment