Skip to content

Commit

Permalink
Merge pull request #339 from jnovy/socketfix
Browse files Browse the repository at this point in the history
Do not leak socket in case of success.
  • Loading branch information
AkihiroSuda authored Mar 27, 2024
2 parents c76f542 + d39499f commit c2f829d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ static int configure_network(const char *tapname,
perror("set route");
goto fail;
}
close(sockfd);
return 0;
fail:
close(sockfd);
Expand Down

0 comments on commit c2f829d

Please sign in to comment.