mirror of https://github.com/ARMmbed/mbed-os.git
Cordio BLE: Fix potential memory leak in GattServer.
parent
ee720f30bb
commit
4acb3937e4
|
@ -84,6 +84,7 @@ ble_error_t GattServer::addService(GattService &service)
|
|||
att_service->attGroup.pAttr =
|
||||
(attsAttr_t*) alloc_block(attributes_count * sizeof(attsAttr_t));
|
||||
if (att_service->attGroup.pAttr == NULL) {
|
||||
delete att_service;
|
||||
return BLE_ERROR_BUFFER_OVERFLOW;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue