Skip to content

Commit

Permalink
contiki network ref count fix
Browse files Browse the repository at this point in the history
Signed-off-by: Simon Thompson <simon.thompson@imgtec.com>
  • Loading branch information
cheekyhalf committed Feb 3, 2017
1 parent 74bf2ff commit 28088bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/common/network_abstraction_contiki.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ void NetworkAddress_Free(NetworkAddress ** address)
{
Lwm2m_Debug("Address free\n");
networkAddressCache[index].InUse = false;
memset(&networkAddressCache[index].Address, 0, sizeof(struct _NetworkAddress));
break;
}
}
Expand Down Expand Up @@ -331,7 +332,6 @@ static NetworkAddress * addCachedAddress(const uip_ipaddr_t * addr, uint16_t por
memcpy(&networkAddress->Address, addr, sizeof(uip_ipaddr_t));
networkAddress->Port = port;
networkAddress->Secure = secure;
networkAddress->useCount = 1;
result = &networkAddressCache[index].Address;
break;
}
Expand Down

0 comments on commit 28088bc

Please sign in to comment.