diff options
| author | Wladimir J. van der Laan <[email protected]> | 2014-07-18 10:45:42 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2014-07-18 10:45:48 +0200 |
| commit | d3cb2b8acfce36d359262b4afd7e7235eff106b0 (patch) | |
| tree | 1dcb8dc7527749289c792c1d2f31ed7a53289a4d /src | |
| parent | Merge pull request #4553 (diff) | |
| parent | prevent SOCKET leak in BindListenPort() (diff) | |
| download | discoin-d3cb2b8acfce36d359262b4afd7e7235eff106b0.tar.xz discoin-d3cb2b8acfce36d359262b4afd7e7235eff106b0.zip | |
Merge pull request #4551
c994d2e prevent SOCKET leak in BindListenPort() (Philip Kaufmann)
Diffstat (limited to 'src')
| -rw-r--r-- | src/net.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net.cpp b/src/net.cpp index 441bde3e9..b55cd72e8 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1678,6 +1678,7 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste else strError = strprintf(_("Unable to bind to %s on this computer (bind returned error %s)"), addrBind.ToString(), NetworkErrorString(nErr)); LogPrintf("%s\n", strError); + CloseSocket(hListenSocket); return false; } LogPrintf("Bound to %s\n", addrBind.ToString()); @@ -1687,6 +1688,7 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste { strError = strprintf(_("Error: Listening for incoming connections failed (listen returned error %s)"), NetworkErrorString(WSAGetLastError())); LogPrintf("%s\n", strError); + CloseSocket(hListenSocket); return false; } |