aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/modes/ecb
diff options
context:
space:
mode:
authorlloyd <[email protected]>2015-03-04 04:30:20 +0000
committerlloyd <[email protected]>2015-03-04 04:30:20 +0000
commit2591a2cd863696b91128ff4a8461bb96d497e7b4 (patch)
treeacb7a179a0790ec63c0c21ecb2ea9d7939e05248 /src/lib/modes/ecb
parentc794f78bd9b7eebc58c39fd00de90b26fb4cfb67 (diff)
Hide Algorithm_Factory and use the functions in lookup.h internally.
Fix two memory leaks (in TLS and modes) caused by calling get_foo and then cloning the result before saving it (leaking the original object), a holdover from the conversion between construction techniques in 1.11.14
Diffstat (limited to 'src/lib/modes/ecb')
-rw-r--r--src/lib/modes/ecb/ecb.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/modes/ecb/ecb.cpp b/src/lib/modes/ecb/ecb.cpp
index 6318671ca..eaab1810d 100644
--- a/src/lib/modes/ecb/ecb.cpp
+++ b/src/lib/modes/ecb/ecb.cpp
@@ -13,7 +13,7 @@ namespace Botan {
template<typename T>
Transform* make_ecb_mode(const Transform::Spec& spec)
{
- std::unique_ptr<BlockCipher> bc(Algo_Registry<BlockCipher>::global_registry().make(spec.arg(0)));
+ std::unique_ptr<BlockCipher> bc(get_block_cipher(spec.arg(0)));
std::unique_ptr<BlockCipherModePaddingMethod> pad(get_bc_pad(spec.arg(1, "NoPadding")));
if(bc && pad)
return new T(bc.release(), pad.release());