aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/dso/dso_lib.c1
-rw-r--r--crypto/engine/eng_dyn.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c
index cc29ca4e4d..dfa738aa0a 100644
--- a/crypto/dso/dso_lib.c
+++ b/crypto/dso/dso_lib.c
@@ -122,6 +122,7 @@ DSO *DSO_new_method(DSO_METHOD *meth)
ret->meth = meth;
ret->references = 1;
if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
+ sk_void_free(ret->meth_data);
OPENSSL_free(ret);
ret = NULL;
}
diff --git a/crypto/engine/eng_dyn.c b/crypto/engine/eng_dyn.c
index d19cab2ecf..bdd0a1aeb6 100644
--- a/crypto/engine/eng_dyn.c
+++ b/crypto/engine/eng_dyn.c
@@ -231,6 +231,8 @@ static int dynamic_set_data_ctx(ENGINE *e, dynamic_data_ctx **ctx)
* If we lost the race to set the context, c is non-NULL and *ctx is the
* context of the thread that won.
*/
+ if (c)
+ sk_OPENSSL_STRING_free(c->dirs);
OPENSSL_free(c);
return 1;
}