Skip to content

Commit bca55ce

Browse files
author
Tero Heinonen
authored
Fix invalid memory read error (#90)
Fixed invalid memory read error. Transaction can be freed in tx-callback, it should not be used after that.
1 parent 8689fca commit bca55ce

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/coap_message_handler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ uint16_t coap_message_handler_request_send(coap_msg_handler_t *handle, int8_t se
381381
//No response expected
382382
return 0;
383383
}
384-
return transaction_ptr->msg_id;
384+
return request.msg_id;
385385
}
386386

387387
static int8_t coap_message_handler_resp_build_and_send(coap_msg_handler_t *handle, sn_coap_hdr_s *coap_msg_ptr, coap_transaction_t *transaction_ptr)

0 commit comments

Comments
 (0)