oops, reinstate correct prototype
[openssl.git] / crypto / engine / eng_table.c
index e0709bef3643a936b39a67ab0ea9b1c7f3ecc1a0..4fde9481852c0e47c7d2062182b72207db01cc21 100644 (file)
@@ -157,7 +157,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
                                goto end;
                                }
                        fnd->funct = NULL;
-                       lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
+                       (void)lh_ENGINE_PILE_insert(&(*table)->piles, fnd);
                        }
                /* A registration shouldn't add duplciate entries */
                (void)sk_ENGINE_delete_ptr(fnd->sk, e);
@@ -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;
        }