diff options
Diffstat (limited to '')
| -rw-r--r-- | src/ext/Util/ca/scanet.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ext/Util/ca/scanet.cpp b/src/ext/Util/ca/scanet.cpp index 11ee487d..a8ad0316 100644 --- a/src/ext/Util/ca/scanet.cpp +++ b/src/ext/Util/ca/scanet.cpp | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. |
| 2 | 2 | ||
| 3 | #include "precomp.h" | 3 | #include "precomp.h" |
| 4 | #include "scanet.h" | ||
| 5 | 4 | ||
| 6 | 5 | ||
| 7 | HRESULT GetDomainServerName(LPCWSTR pwzDomain, LPWSTR* ppwzServerName, ULONG flags) | 6 | HRESULT GetDomainServerName(LPCWSTR pwzDomain, LPWSTR* ppwzServerName, ULONG flags) |
| @@ -25,16 +24,16 @@ HRESULT GetDomainServerName(LPCWSTR pwzDomain, LPWSTR* ppwzServerName, ULONG fla | |||
| 25 | if ('\\' == *pDomainControllerInfo->DomainControllerName && '\\' == *pDomainControllerInfo->DomainControllerName + 1) | 24 | if ('\\' == *pDomainControllerInfo->DomainControllerName && '\\' == *pDomainControllerInfo->DomainControllerName + 1) |
| 26 | { | 25 | { |
| 27 | hr = StrAllocString(ppwzServerName, pDomainControllerInfo->DomainControllerName + 2, 0); | 26 | hr = StrAllocString(ppwzServerName, pDomainControllerInfo->DomainControllerName + 2, 0); |
| 28 | ExitOnFailure(hr, "failed to allocate memory for string"); | ||
| 29 | } | 27 | } |
| 30 | else | 28 | else |
| 31 | { | 29 | { |
| 32 | hr = StrAllocString(ppwzServerName, pDomainControllerInfo->DomainControllerName, 0); | 30 | hr = StrAllocString(ppwzServerName, pDomainControllerInfo->DomainControllerName, 0); |
| 33 | ExitOnFailure(hr, "failed to allocate memory for string"); | ||
| 34 | } | 31 | } |
| 32 | ExitOnFailure(hr, "failed to allocate memory for string"); | ||
| 35 | } | 33 | } |
| 36 | else | 34 | else |
| 37 | { | 35 | { |
| 36 | // we won't report any potential string allocation failure, the domain failure is more interesting | ||
| 38 | StrAllocString(ppwzServerName, pwzDomain, 0); | 37 | StrAllocString(ppwzServerName, pwzDomain, 0); |
| 39 | hr = HRESULT_FROM_WIN32(er); | 38 | hr = HRESULT_FROM_WIN32(er); |
| 40 | ExitOnFailure(hr, "failed to contact domain %ls", pwzDomain); | 39 | ExitOnFailure(hr, "failed to contact domain %ls", pwzDomain); |
