diff options
-rw-r--r-- | src/lib/pubkey/ec_group/ec_group.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/pubkey/ec_group/ec_group.cpp b/src/lib/pubkey/ec_group/ec_group.cpp index ddd7251e2..c5c39b6b3 100644 --- a/src/lib/pubkey/ec_group/ec_group.cpp +++ b/src/lib/pubkey/ec_group/ec_group.cpp @@ -171,6 +171,12 @@ class EC_Group_Data_Map final //static EC_Group_Data_Map& EC_Group::ec_group_data() { + /* + * This exists purely to ensure the allocator is constructed before g_ec_data, + * which ensures that its destructor runs after ~g_ec_data is complete. + */ + secure_vector<uint8_t> initialize_allocator(1); + static EC_Group_Data_Map g_ec_data; return g_ec_data; } |