From cba45fbd725357be36de539c7ac2dc1c2e67ab27 Mon Sep 17 00:00:00 2001 From: miod <> Date: Sun, 13 Jul 2014 15:41:33 +0000 Subject: Warn about the use of BUF_strdup. --- src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib') diff --git a/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod b/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod index a83f46f896..2805755869 100644 --- a/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod +++ b/src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod @@ -45,10 +45,12 @@ B. Any data already in the buffer is preserved if it increases in size. BUF_strdup() copies a null terminated string into a block of allocated memory -and returns a pointer to the allocated block. +and returns a pointer to the allocated block. Unlike the system strdup() +function, BUF_strdup() will accept a NULL argument and will return NULL in +that case. Its use in new programes is discouraged. The memory allocated from BUF_strdup() should be freed up using the -OPENSSL_free() function. +free() function. =head1 RETURN VALUES -- cgit v1.2.3-55-g6feb