nor: fix memory leaks during probe
Fix similar memory leaks as per commit:
ef72484b78
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
This commit is contained in:
@@ -139,6 +139,12 @@ static int tms470_read_part_info(struct flash_bank *bank)
|
||||
rom_flash = (device_ident_reg >> 10) & 1;
|
||||
part_number = (device_ident_reg >> 3) & 0x7f;
|
||||
|
||||
if (bank->sectors)
|
||||
{
|
||||
free(bank->sectors);
|
||||
bank->sectors = NULL;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the part number is known, determine if the flash bank is valid
|
||||
* based on the base address being within the known flash bank
|
||||
|
||||
Reference in New Issue
Block a user