mirror of https://github.com/ARMmbed/mbed-os.git
GenericGattClient: Fix discovery termination.
The procedure should be terminated whenever the server returns an error not equal to ATTRIBUTE_NOT_FOUND. The block was effectivelly terminated but the procedure was not. As a result the discovery was operating on already freed memory.pull/6814/head
parent
e43d21d4ef
commit
fd5903c22d
|
|
@ -147,6 +147,7 @@ struct GenericGattClient::DiscoveryControlBlock : public ProcedureControlBlock {
|
|||
const AttErrorResponse& error = static_cast<const AttErrorResponse&>(message);
|
||||
if (error.error_code != AttErrorResponse::ATTRIBUTE_NOT_FOUND) {
|
||||
terminate(client);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (error.request_opcode) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue