mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 11:27:28 -03:00
util: Add missing types in make_secure_unique
This commit is contained in:
parent
35000e34cf
commit
fa397177ac
1 changed files with 2 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
||||||
// Copyright (c) 2009-2021 The Bitcoin Core developers
|
// Copyright (c) 2009-present The Bitcoin Core developers
|
||||||
// Distributed under the MIT software license, see the accompanying
|
// Distributed under the MIT software license, see the accompanying
|
||||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ secure_unique_ptr<T> make_secure_unique(Args&&... as)
|
||||||
|
|
||||||
// initialize in place, and return as secure_unique_ptr
|
// initialize in place, and return as secure_unique_ptr
|
||||||
try {
|
try {
|
||||||
return secure_unique_ptr<T>(new (p) T(std::forward(as)...));
|
return secure_unique_ptr<T>(new (p) T(std::forward<Args>(as)...));
|
||||||
} catch (...) {
|
} catch (...) {
|
||||||
secure_allocator<T>().deallocate(p, 1);
|
secure_allocator<T>().deallocate(p, 1);
|
||||||
throw;
|
throw;
|
||||||
|
|
Loading…
Reference in a new issue