diff options
Diffstat (limited to 'main/openssl/crypto/engine/eng_dyn.c')
-rw-r--r-- | main/openssl/crypto/engine/eng_dyn.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/main/openssl/crypto/engine/eng_dyn.c b/main/openssl/crypto/engine/eng_dyn.c index 807da7a5..8fb8634e 100644 --- a/main/openssl/crypto/engine/eng_dyn.c +++ b/main/openssl/crypto/engine/eng_dyn.c @@ -408,7 +408,7 @@ static int int_load(dynamic_data_ctx *ctx) int num, loop; /* Unless told not to, try a direct load */ if((ctx->dir_load != 2) && (DSO_load(ctx->dynamic_dso, - ctx->DYNAMIC_LIBNAME, NULL, 0)) != NULL) + ctx->DYNAMIC_LIBNAME, NULL, 0) != NULL)) return 1; /* If we're not allowed to use 'dirs' or we have none, fail */ if(!ctx->dir_load || (num = sk_OPENSSL_STRING_num(ctx->dirs)) < 1) @@ -423,6 +423,9 @@ static int int_load(dynamic_data_ctx *ctx) { /* Found what we're looking for */ OPENSSL_free(merge); + /* Previous failed loop iterations, if any, will have resulted in + * errors. Clear them out before returning success. */ + ERR_clear_error(); return 1; } OPENSSL_free(merge); |