Skip to content

Commit 1a4480a

Browse files
authored
Merge pull request #87 from TERESH1/get_address_family-memory-leak
Fix memory leak in get_address_family
2 parents fe5f78c + e77a5b3 commit 1a4480a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

C/inet/libinetsocket.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -939,6 +939,8 @@ int get_address_family(const char *hostname) {
939939
af = -1;
940940
}
941941

942+
freeaddrinfo(result);
943+
942944
return af;
943945
}
944946

0 commit comments

Comments
 (0)