Skip to content

Commit e77a5b3

Browse files
authored
Fix memory leak in get_address_family
1 parent fe5f78c commit e77a5b3

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)