Skip to content

Commit

Permalink
Fix memory leak in framework test
Browse files Browse the repository at this point in the history
  • Loading branch information
babelouest committed Nov 5, 2021
1 parent 21ce99f commit 424ccb1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/framework.c
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,12 @@ static int has_ipv6() {
for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) {
if (ifa->ifa_addr != NULL) {
if (ifa->ifa_addr->sa_family == AF_INET6) {
freeifaddrs(ifaddr);
return 1;
}
}
}
freeifaddrs(ifaddr);
return 0;
}

Expand Down

0 comments on commit 424ccb1

Please sign in to comment.