summaryrefslogtreecommitdiff
path: root/keystore
diff options
context:
space:
mode:
authorFrederick Mayle <fmayle@google.com>2022-03-23 17:00:27 +0000
committerFrederick Mayle <fmayle@google.com>2022-03-23 19:57:13 +0000
commit9afe88283d069f99350af8ab87205318bf664005 (patch)
treeb364dcbcdb7fb3ba013c4614805ec7d815b55e41 /keystore
parentebac76cc1441680d010803f707ddc6dcaf918a08 (diff)
downloadsecurity-9afe88283d069f99350af8ab87205318bf664005.tar.gz
keystore: Fix double ownership of ConfirmationListener
Using std::make_shared with ndk::SharedRefBase objects causes memory errors. Ignore-AOSP-First: Waiting for security team feedback first. Bug: 226234140, 226379467 Test: TH Change-Id: I3fa639e92024ec418c69b4e355ac425884c22026
Diffstat (limited to 'keystore')
-rw-r--r--keystore/keystore_cli_v2.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystore/keystore_cli_v2.cpp b/keystore/keystore_cli_v2.cpp
index 1e9126d0..d01c67d4 100644
--- a/keystore/keystore_cli_v2.cpp
+++ b/keystore/keystore_cli_v2.cpp
@@ -1025,7 +1025,7 @@ int Confirmation(const std::string& promptText, const std::string& extraDataHex,
return 1;
}
- auto listener = std::make_shared<ConfirmationListener>();
+ auto listener = ndk::SharedRefBase::make<ConfirmationListener>();
auto future = listener->get_future();
auto rc = apcService->presentPrompt(listener, promptText, extraData, locale, uiOptionsAsFlags);