summaryrefslogtreecommitdiff
path: root/src/utilcode/ccomprc.cpp
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2015-03-25 16:07:45 +0100
committerJan Vorlicek <janvorli@microsoft.com>2015-03-25 16:07:45 +0100
commit5f65bd65a89725852c6686cdd5521220cdc913c3 (patch)
tree0b611a090cc63597780f35c7753669705174d64f /src/utilcode/ccomprc.cpp
parent76487bfc8ab78b35c120fc1dd590ae892e4af5f6 (diff)
downloadcoreclr-5f65bd65a89725852c6686cdd5521220cdc913c3.tar.gz
coreclr-5f65bd65a89725852c6686cdd5521220cdc913c3.tar.bz2
coreclr-5f65bd65a89725852c6686cdd5521220cdc913c3.zip
Propagate bindtextdomain status to the caller
The bindtextdomain can fail due to OOM. Propagate the status out of the PAL_BindResources.
Diffstat (limited to 'src/utilcode/ccomprc.cpp')
-rw-r--r--src/utilcode/ccomprc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/utilcode/ccomprc.cpp b/src/utilcode/ccomprc.cpp
index d69fe0c77d..f78640c769 100644
--- a/src/utilcode/ccomprc.cpp
+++ b/src/utilcode/ccomprc.cpp
@@ -328,7 +328,11 @@ HRESULT CCompRC::Init(LPCWSTR pResourceFile, BOOL bUseFallback)
_ASSERTE(!"Unsupported resource file");
}
- PAL_BindResources(m_pResourceDomain);
+ if (!PAL_BindResources(m_pResourceDomain))
+ {
+ // The function can fail only due to OOM
+ return E_OUTOFMEMORY;
+ }
#endif // FEATURE_PAL