diff options
author | tb <> | 2022-11-06 18:31:15 +0000 |
---|---|---|
committer | tb <> | 2022-11-06 18:31:15 +0000 |
commit | 8eb977233c50d27fe9ab4466a73db176445f36ad (patch) | |
tree | ea70d8436823e21672792ad2b4af6b35f108157b | |
parent | fd27c1487225585e6442d02f0a4724e10808ee2a (diff) | |
download | openbsd-8eb977233c50d27fe9ab4466a73db176445f36ad.tar.gz openbsd-8eb977233c50d27fe9ab4466a73db176445f36ad.tar.bz2 openbsd-8eb977233c50d27fe9ab4466a73db176445f36ad.zip |
Document that OPENSSL_free() is required in some circumstances
BoringSSL uses the common trick of storing malloc metadata in a prefix
and then returning a pointer with an offset. Therefore callers must not
call free() but OPENSSL_free().
Reported by dropk1ck via tobhe
ok beck jsing
-rw-r--r-- | src/lib/libcrypto/man/OPENSSL_malloc.3 | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/man/OPENSSL_malloc.3 b/src/lib/libcrypto/man/OPENSSL_malloc.3 index e6dba165f8..87f8d81ed1 100644 --- a/src/lib/libcrypto/man/OPENSSL_malloc.3 +++ b/src/lib/libcrypto/man/OPENSSL_malloc.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: OPENSSL_malloc.3,v 1.9 2019/06/10 09:49:48 schwarze Exp $ | 1 | .\" $OpenBSD: OPENSSL_malloc.3,v 1.10 2022/11/06 18:31:15 tb Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> | 3 | .\" Copyright (c) 2016 Ingo Schwarze <schwarze@openbsd.org> |
4 | .\" | 4 | .\" |
@@ -14,7 +14,7 @@ | |||
14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 14 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | .\" | 16 | .\" |
17 | .Dd $Mdocdate: June 10 2019 $ | 17 | .Dd $Mdocdate: November 6 2022 $ |
18 | .Dt OPENSSL_MALLOC 3 | 18 | .Dt OPENSSL_MALLOC 3 |
19 | .Os | 19 | .Os |
20 | .Sh NAME | 20 | .Sh NAME |
@@ -108,3 +108,7 @@ and | |||
108 | .Fn OPENSSL_strdup | 108 | .Fn OPENSSL_strdup |
109 | first appeared in OpenSSL 0.9.8j and have been available since | 109 | first appeared in OpenSSL 0.9.8j and have been available since |
110 | .Ox 4.5 . | 110 | .Ox 4.5 . |
111 | .Sh CAVEATS | ||
112 | If interoperability with other implementations is required, | ||
113 | memory returned by the library as bare pointers must be freed with | ||
114 | .Fn OPENSSL_free . | ||