diff options
author | Frederick Mayle <fmayle@google.com> | 2022-03-29 17:37:14 +0000 |
---|---|---|
committer | Frederick Mayle <fmayle@google.com> | 2022-03-29 17:37:14 +0000 |
commit | b3f93cded373be40d51c86182708864da09b36b6 (patch) | |
tree | fe36596a3444b26a44cadef2a7e872b0356b0ecf /keystore | |
parent | b174ed0494c13b4adb6bdd634f4bec512878a025 (diff) | |
download | security-b3f93cded373be40d51c86182708864da09b36b6.tar.gz |
keystore: Fix double ownership of ConfirmationListener in test
Using std::make_shared with ndk::SharedRefBase objects causes memory
errors.
Test: TH
Bug: 226379467
Change-Id: I889f7a5b79b4c22b313cdcb6a118d7bb5d62d7a5
Diffstat (limited to 'keystore')
-rw-r--r-- | keystore/tests/confirmationui_invocation_test.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/keystore/tests/confirmationui_invocation_test.cpp b/keystore/tests/confirmationui_invocation_test.cpp index 7f8a3738..822e6a4c 100644 --- a/keystore/tests/confirmationui_invocation_test.cpp +++ b/keystore/tests/confirmationui_invocation_test.cpp @@ -55,7 +55,7 @@ TEST(ConfirmationInvocationTest, InvokeAndCancel) { std::string locale("en"); std::vector<uint8_t> extraData{0xaa, 0xff, 0x00, 0x55}; - auto listener = std::make_shared<ConfirmationListener>(); + auto listener = ndk::SharedRefBase::make<ConfirmationListener>(); auto future = listener->get_future(); |