Skip to content

Commit

Permalink
Delete transaction when handling response (ARMmbed#110)
Browse files Browse the repository at this point in the history
Delete allocated transaction_ptr when handling response to avoid
floating transactions with msg id 0.
  • Loading branch information
Arto Kinnunen authored Oct 31, 2018
1 parent 0292600 commit bc331ca
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions source/coap_message_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,7 @@ int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t
goto exit;
/* Response received */
} else {
transaction_delete(transaction_ptr); // transaction_ptr not needed in response
if (coap_message->token_ptr) {
this = transaction_find_client_by_token(coap_message->token_ptr, coap_message->token_len, source_addr_ptr, port);
}
Expand Down

0 comments on commit bc331ca

Please sign in to comment.