summaryrefslogtreecommitdiff
path: root/lib/libcrypto/man/ERR_remove_state.3
blob: faa1aa227f9e0c8125bc13ed80fabf60424bee1c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
.\"	$OpenBSD: ERR_remove_state.3,v 1.2 2016/11/06 15:52:50 jmc Exp $
.\"
.Dd $Mdocdate: November 6 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 VALUES
.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 .