Skip to content

Commit bc331ca

Browse files
author
Arto Kinnunen
authored
Delete transaction when handling response (ARMmbed#110)
Delete allocated transaction_ptr when handling response to avoid floating transactions with msg id 0.
1 parent 0292600 commit bc331ca

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/coap_message_handler.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ int16_t coap_message_handler_coap_msg_process(coap_msg_handler_t *handle, int8_t
349349
goto exit;
350350
/* Response received */
351351
} else {
352+
transaction_delete(transaction_ptr); // transaction_ptr not needed in response
352353
if (coap_message->token_ptr) {
353354
this = transaction_find_client_by_token(coap_message->token_ptr, coap_message->token_len, source_addr_ptr, port);
354355
}

0 commit comments

Comments
 (0)