mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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: Christoph Jaeger <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
34ec43661f
commit
7c73528273
1 changed files with 1 additions and 0 deletions
|
|
@ -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++;
|
||||
|
|
|
|||
Loading…
Reference in a new issue