mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #7384 from OpenNuvoton/nuvoton_fix_mbr_memleak
Fix memory leakage with MBR on exiting error pathpull/7411/head
commit
b50f09d57d
|
@ -242,6 +242,7 @@ int MBRBlockDevice::init()
|
|||
|
||||
// Check that block addresses are valid
|
||||
if (!_bd->is_valid_erase(_offset, _size)) {
|
||||
delete[] buffer;
|
||||
return BD_ERROR_INVALID_PARTITION;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue