diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index be3acabf3e..bb4cb2fdf0 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -751,6 +751,7 @@ int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stack, ret = 1; err: + if (d) closedir(d); CRYPTO_w_unlock(CRYPTO_LOCK_READDIR); return ret; }