diff options
Diffstat (limited to 'toxcore/network.c')
-rw-r--r-- | toxcore/network.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/toxcore/network.c b/toxcore/network.c index 1186a468..839618bf 100644 --- a/toxcore/network.c +++ b/toxcore/network.c | |||
@@ -540,8 +540,10 @@ Networking_Core *new_networking(IP ip, uint16_t port) | |||
540 | addr6->sin6_scope_id = 0; | 540 | addr6->sin6_scope_id = 0; |
541 | 541 | ||
542 | portptr = &addr6->sin6_port; | 542 | portptr = &addr6->sin6_port; |
543 | } else | 543 | } else { |
544 | free(temp); | ||
544 | return NULL; | 545 | return NULL; |
546 | } | ||
545 | 547 | ||
546 | if (ip.family == AF_INET6) { | 548 | if (ip.family == AF_INET6) { |
547 | char ipv6only = 0; | 549 | char ipv6only = 0; |