Skip to content
Snippets Groups Projects
Commit 290f86d2 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix resource leak in network setup

parent 87b3c4ad
No related branches found
No related tags found
No related merge requests found
......@@ -454,6 +454,7 @@ S32 start_net(S32& socket_out, int& nPort)
{
LL_WARNS() << "startNet() : Couldn't find available network port." << LL_ENDL;
// Fail gracefully in release.
close(hSocket);
return 3;
}
}
......@@ -462,6 +463,7 @@ S32 start_net(S32& socket_out, int& nPort)
{
LL_WARNS() << llformat ("bind() port: %d failed, Err: %s\n", nPort, strerror(errno)) << LL_ENDL;
// Fail gracefully in release.
close(hSocket);
return 4;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment