aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--clients/net-snk/app/netlib/ipv6.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/clients/net-snk/app/netlib/ipv6.c b/clients/net-snk/app/netlib/ipv6.c
index 220fd36..6aa1ea3 100644
--- a/clients/net-snk/app/netlib/ipv6.c
+++ b/clients/net-snk/app/netlib/ipv6.c
@@ -330,7 +330,8 @@ int8_t ip6addr_add(struct ip6addr_list_entry *new_address)
if (first_ip6 == NULL)
first_ip6 = new_address;
- last_ip6->next = new_address;
+ else
+ last_ip6->next = new_address;
last_ip6 = new_address;
last_ip6->next = NULL;