Skip to content

Commit a60df63

Browse files
committed
thread_mle_message_handler: fix null comparison.
Fixes Coverity issue about comparing nullptr.
1 parent 76407bc commit a60df63

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

features/nanostack/sal-stack-nanostack/source/6LoWPAN/Thread/thread_mle_message_handler.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ static void thread_parse_annoucement(protocol_interface_info_entry_t *cur, mle_m
514514
channel_page = ptr[0];
515515
channel = common_read_16_bit(&ptr[1]);
516516

517-
if (linkConfiguration->timestamp == timestamp) {
517+
if (linkConfiguration && linkConfiguration->timestamp == timestamp) {
518518
// We received same timestamp
519519
tr_debug("Same timestamp");
520520
return;
@@ -527,7 +527,7 @@ static void thread_parse_annoucement(protocol_interface_info_entry_t *cur, mle_m
527527
}
528528

529529

530-
if (linkConfiguration->timestamp > timestamp) {
530+
if (linkConfiguration && linkConfiguration->timestamp > timestamp) {
531531
// We received older time stamp we just announce back to originator channel
532532
thread_bootstrap_announce_send(cur, linkConfiguration->channel_page, linkConfiguration->rfChannel, linkConfiguration->panId, linkConfiguration->timestamp, channel);
533533
return;

0 commit comments

Comments
 (0)