mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
Fixed possible memory leak.
This commit is contained in:
parent
7a2ed25d36
commit
80f001e03b
|
@ -540,8 +540,10 @@ Networking_Core *new_networking(IP ip, uint16_t port)
|
|||
addr6->sin6_scope_id = 0;
|
||||
|
||||
portptr = &addr6->sin6_port;
|
||||
} else
|
||||
} else {
|
||||
free(temp);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (ip.family == AF_INET6) {
|
||||
char ipv6only = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user