mirror of https://github.com/ARMmbed/mbed-os.git
Fix memory leakage with MBR on exiting error path
parent
83cd02e501
commit
6de4b3532c
|
@ -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