summaryrefslogtreecommitdiff
path: root/contexts/keymaster2_passthrough_context.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contexts/keymaster2_passthrough_context.cpp')
-rw-r--r--contexts/keymaster2_passthrough_context.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/contexts/keymaster2_passthrough_context.cpp b/contexts/keymaster2_passthrough_context.cpp
index fe83de8..75ed9b6 100644
--- a/contexts/keymaster2_passthrough_context.cpp
+++ b/contexts/keymaster2_passthrough_context.cpp
@@ -42,7 +42,7 @@ void Keymaster2PassthroughContext::GetSystemVersion(uint32_t* os_version,
KeyFactory* Keymaster2PassthroughContext::GetKeyFactory(keymaster_algorithm_t algorithm) const {
auto& result = factories_[algorithm];
if (!result) {
- result.reset(new KeymasterPassthroughKeyFactory(engine_.get(), algorithm));
+ result.reset(new (std::nothrow) KeymasterPassthroughKeyFactory(engine_.get(), algorithm));
}
return result.get();
}