]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/engine/eng_table.c
misspellings fixes by https://github.com/vlajos/misspell_fixer
[thirdparty/openssl.git] / crypto / engine / eng_table.c
index 954b4d79702c6ddb8ee47b906c4b0cef96cc9745..93dc90ec3c1cef38a4798a79e93a646a30227afd 100644 (file)
@@ -189,7 +189,7 @@ end:
 static void int_unregister_cb_doall_arg(ENGINE_PILE *pile, ENGINE *e)
        {
        int n;
-       /* Iterate the 'c->sk' stack removing any occurance of 'e' */
+       /* Iterate the 'c->sk' stack removing any occurrence of 'e' */
        while((n = sk_ENGINE_find(pile->sk, e)) >= 0)
                {
                (void)sk_ENGINE_delete(pile->sk, n);
@@ -254,6 +254,7 @@ ENGINE *engine_table_select_tmp(ENGINE_TABLE **table, int nid, const char *f, in
 #endif
                return NULL;
                }
+       ERR_set_mark();
        CRYPTO_w_lock(CRYPTO_LOCK_ENGINE);
        /* Check again inside the lock otherwise we could race against cleanup
         * operations. But don't worry about a fprintf(stderr). */
@@ -327,7 +328,7 @@ end:
        CRYPTO_w_unlock(CRYPTO_LOCK_ENGINE);
        /* Whatever happened, any failed init()s are not failures in this
         * context, so clear our error state. */
-       ERR_clear_error();
+       ERR_pop_to_mark();
        return ret;
        }