.Dd $Mdocdate: November 2 2016 $ .Dt ERR_REMOVE_STATE 3 .Os .Sh NAME .Nm ERR_remove_thread_state , .Nm ERR_remove_state .Nd free a thread's OpenSSL error queue .Sh SYNOPSIS .In openssl/err.h .Ft void .Fo ERR_remove_thread_state .Fa "const CRYPTO_THREADID *tid" .Fc .Pp Deprecated: .Pp .Ft void .Fo ERR_remove_state .Fa "unsigned long pid" .Fc .Sh DESCRIPTION .Fn ERR_remove_thread_state frees the error queue associated with thread .Fa tid . If .Fa tid is .Dv NULL , the current thread will have its error queue removed. .Pp Since error queue data structures are allocated automatically for new threads, they must be freed when threads are terminated in order to avoid memory leaks. .Pp .Fn ERR_remove_state is deprecated and has been replaced by .Fn ERR_remove_thread_state . Since threads in OpenSSL are no longer identified by unsigned long values, any argument to this function is ignored. Calling .Fn ERR_remove_state is equivalent to .Fn ERR_remove_thread_state NULL . .Sh RETURN VALUE .Fn ERR_remove_thread_state and .Fn ERR_remove_state return no value. .Sh SEE ALSO .Xr ERR 3 .Sh HISTORY .Fn ERR_remove_state is available in all versions of SSLeay and OpenSSL. It was deprecated in OpenSSL 1.0.0 when .Fn ERR_remove_thread_state was introduced and thread IDs were introduced to identify threads instead of .Vt unsigned long .