Skip to content

Commit 0b7f9fe

Browse files
author
Arto Kinnunen
authored
Update Thread child id request timeout handling (ARMmbed#1715)
Do not use variable after deleting it.
1 parent 3e8df0a commit 0b7f9fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/6LoWPAN/Thread/thread_host_bootstrap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1026,8 +1026,9 @@ static bool thread_child_id_req_timeout(int8_t interface_id, uint16_t msgId, boo
10261026

10271027
entry_temp = mle_class_get_entry_by_ll64(cur->id, scanned_parent->linkMarginToParent, ll64, false, NULL);
10281028
if (entry_temp) {
1029+
bool my_parent = thread_check_is_this_my_parent(cur, entry_temp);
10291030
mle_class_remove_entry(cur->id, entry_temp);
1030-
if (thread_check_is_this_my_parent(cur, entry_temp)) {
1031+
if (my_parent) {
10311032
tr_debug("No parent resp - any-attach");
10321033
thread_bootstrap_connection_error(interface_id, CON_ERROR_NETWORK_ATTACH_FAIL, NULL);
10331034
goto exit;

0 commit comments

Comments
 (0)