Skip to content

Commit

Permalink
Do not leak socket in case of success.
Browse files Browse the repository at this point in the history
Signed-off-by: Jindrich Novy <[email protected]>
  • Loading branch information
jnovy committed Mar 20, 2024
1 parent c76f542 commit d39499f
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 d39499f

Please sign in to comment.