Skip to content

Commit

Permalink
valgrind and coverity reported errors fixed. (ARMmbed#1838)
Browse files Browse the repository at this point in the history
Coverity CID: 277994 fixed.
  • Loading branch information
deepakvenugopal authored Sep 28, 2018
1 parent 9b14b83 commit c14343a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 4 additions & 1 deletion source/6LoWPAN/Thread/thread_extension.c
Original file line number Diff line number Diff line change
Expand Up @@ -626,8 +626,11 @@ void thread_extension_address_registration(struct protocol_interface_info_entry
void thread_extension_dua_address_generate(protocol_interface_info_entry_t *cur, uint8_t *domain_prefix, uint8_t domain_prefix_len)
{
if_address_entry_t *def_address = NULL;
addr_delete_matching(cur, NULL, 0, ADDR_SOURCE_THREAD_DOMAIN);
uint8_t domain_address[16];
if (!thread_extension_version_check(thread_info(cur)->version)) {
return;
}
addr_delete_matching(cur, NULL, 0, ADDR_SOURCE_THREAD_DOMAIN);
memcpy(domain_address, domain_prefix, 8);
def_address = icmpv6_slaac_address_add(cur, domain_address, domain_prefix_len, 0xffffffff, 0xffffffff, true, SLAAC_IID_DEFAULT);
if (def_address) {
Expand Down
3 changes: 3 additions & 0 deletions source/6LoWPAN/Thread/thread_extension_bbr.c
Original file line number Diff line number Diff line change
Expand Up @@ -873,6 +873,9 @@ static int thread_extension_bbr_dua_cb(int8_t service_id, uint8_t source_address
}
*/
protocol_interface_info_entry_t *cur = protocol_stack_interface_info_get_by_id(this->interface_id);
if (!cur) {
return -1;
}
if (0 == thread_extension_primary_bbr_get(cur, bbr_rloc_addr, NULL, NULL, NULL) &&
!addr_get_entry(cur,bbr_rloc_addr)) {
// Primary pBBR present and I am not the pBBR
Expand Down

0 comments on commit c14343a

Please sign in to comment.