aboutsummaryrefslogtreecommitdiffstats
path: root/src/algo_factory/algo_factory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/algo_factory/algo_factory.cpp')
-rw-r--r--src/algo_factory/algo_factory.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/algo_factory/algo_factory.cpp b/src/algo_factory/algo_factory.cpp
index 22915d97c..0b8422bcb 100644
--- a/src/algo_factory/algo_factory.cpp
+++ b/src/algo_factory/algo_factory.cpp
@@ -84,15 +84,14 @@ const T* factory_prototype(const std::string& algo_spec,
/**
* Setup caches
*/
-Algorithm_Factory::Algorithm_Factory(const std::vector<Engine*>& engines_in,
- Mutex_Factory& mf)
+Algorithm_Factory::Algorithm_Factory(const std::vector<Engine*>& engines_in)
{
engines = engines_in;
- block_cipher_cache = new Algorithm_Cache<BlockCipher>(mf.make());
- stream_cipher_cache = new Algorithm_Cache<StreamCipher>(mf.make());
- hash_cache = new Algorithm_Cache<HashFunction>(mf.make());
- mac_cache = new Algorithm_Cache<MessageAuthenticationCode>(mf.make());
+ block_cipher_cache = new Algorithm_Cache<BlockCipher>();
+ stream_cipher_cache = new Algorithm_Cache<StreamCipher>();
+ hash_cache = new Algorithm_Cache<HashFunction>();
+ mac_cache = new Algorithm_Cache<MessageAuthenticationCode>();
}
/**
@@ -100,7 +99,8 @@ Algorithm_Factory::Algorithm_Factory(const std::vector<Engine*>& engines_in,
*/
Algorithm_Factory::~Algorithm_Factory()
{
- std::for_each(engines.begin(), engines.end(), del_fun<Engine>());
+ for(auto i = engines.begin(); i != engines.end(); ++i)
+ delete *i;
delete block_cipher_cache;
delete stream_cipher_cache;