Copy the current thread's error queue into es and clear the thread queue.
es
Declared in <openssl/err.h>
<openssl/err.h>
void OSSL_ERR_STATE_save(ERR_STATE* es);