Skip to content

Commit

Permalink
Fix memory leak with addrinfo
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-mishin authored and bmah888 committed Mar 21, 2024
1 parent e06177c commit 111212b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ create_socket(int domain, int proto, const char *local, const char *bind_dev, in
if ((gerror = getaddrinfo(server, portstr, &hints, &server_res)) != 0) {
if (local)
freeaddrinfo(local_res);
freeaddrinfo(server_res);
return -1;
}

Expand Down

0 comments on commit 111212b

Please sign in to comment.