diff --git a/libraries/plugins/elasticsearch/elasticsearch_plugin.cpp b/libraries/plugins/elasticsearch/elasticsearch_plugin.cpp index c2cfcb9129..0719fc06b4 100644 --- a/libraries/plugins/elasticsearch/elasticsearch_plugin.cpp +++ b/libraries/plugins/elasticsearch/elasticsearch_plugin.cpp @@ -93,6 +93,10 @@ class elasticsearch_plugin_impl elasticsearch_plugin_impl::~elasticsearch_plugin_impl() { + if (curl) { + curl_easy_cleanup(curl); + curl = nullptr; + } return; } diff --git a/libraries/plugins/es_objects/es_objects.cpp b/libraries/plugins/es_objects/es_objects.cpp index 21ae19094e..b3f24f72ac 100644 --- a/libraries/plugins/es_objects/es_objects.cpp +++ b/libraries/plugins/es_objects/es_objects.cpp @@ -214,6 +214,10 @@ void es_objects_plugin_impl::prepareTemplate(T blockchain_object, string index_n es_objects_plugin_impl::~es_objects_plugin_impl() { + if (curl) { + curl_easy_cleanup(curl); + curl = nullptr; + } return; }