Fix two possible leaks. Signed-off-by: Kurt Roeckx <kurt@roeckx.be> Reviewed-by: Rich Salz <rsalz@openssl.org> GH: #580
diff --git a/crypto/dso/dso_lib.c b/crypto/dso/dso_lib.c index cc29ca4..dfa738a 100644 --- a/crypto/dso/dso_lib.c +++ b/crypto/dso/dso_lib.c
@@ -122,6 +122,7 @@ 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 d19cab2..bdd0a1a 100644 --- a/crypto/engine/eng_dyn.c +++ b/crypto/engine/eng_dyn.c
@@ -231,6 +231,8 @@ * 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; }