aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2016-01-10 23:25:07 +0000
committerDr. Stephen Henson <steve@openssl.org>2016-01-11 02:41:16 +0000
commit4e482ae6ff62dd992354cad61dd3d81d55b6e204 (patch)
treec071069a6a3da8d4627329336b67cc62fd63015a /doc
parentc2e27310c790c0dd2f87dd420e65e0cca522ddb2 (diff)
downloadopenssl-4e482ae6ff62dd992354cad61dd3d81d55b6e204.tar.gz
Add memory leak return value.
Make CRYPTO_mem_leaks() and CRYPTO_mem_leaks_fp() return a status value. Update documentation. Don't abort() if there are leaks. Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Diffstat (limited to 'doc')
-rw-r--r--doc/crypto/OPENSSL_malloc.pod11
1 files changed, 6 insertions, 5 deletions
diff --git a/doc/crypto/OPENSSL_malloc.pod b/doc/crypto/OPENSSL_malloc.pod
index eef8c64393..9dfeb390bf 100644
--- a/doc/crypto/OPENSSL_malloc.pod
+++ b/doc/crypto/OPENSSL_malloc.pod
@@ -132,17 +132,18 @@ OPENSSL_mem_debug_pop() removes identifying state from the stack.
At the end of the program, calling CRYPTO_mem_leaks() or
CRYPTO_mem_leaks_fp() will report all "leaked" memory, writing it
-to the specified BIO B<b> or FILE B<fp>.
-It will then L<abort(3)> if there were any unfree'd allocations.
+to the specified BIO B<b> or FILE B<fp>. These functions return 1 if
+there are no leaks, 0 if there are leaks and -1 if an error occurred.
=head1 RETURN VALUES
OPENSSL_malloc_init(), OPENSSL_free(), OPENSSL_clear_free()
-CRYPTO_free(), CRYPTO_clear_free(),
-CRYPTO_get_mem_functions(), and
-CRYPTO_mem_leaks()
+CRYPTO_free(), CRYPTO_clear_free() and CRYPTO_get_mem_functions()
return no value.
+CRYPTO_mem_leaks() and CRYPTO_mem_leaks_fp() return 1 if there
+are no leaks, 0 if there are leaks and -1 if an error occurred.
+
OPENSSL_malloc(), OPENSSL_zalloc(), OPENSSL_realloc(),
OPENSSL_clear_realloc(),
CRYPTO_malloc(), CRYPTO_zalloc(), CRYPTO_realloc(),