diff options
author | miod <> | 2014-07-08 20:26:05 +0000 |
---|---|---|
committer | miod <> | 2014-07-08 20:26:05 +0000 |
commit | 471cb1a71c9be6c2aa1b1c74bdd8965585a868ff (patch) | |
tree | fe0a540562429a53357818cccd73451a51f7ebd5 /src/lib | |
parent | e1755ea8fa80127d1448326140e7245d439d023f (diff) | |
download | openbsd-471cb1a71c9be6c2aa1b1c74bdd8965585a868ff.tar.gz openbsd-471cb1a71c9be6c2aa1b1c74bdd8965585a868ff.tar.bz2 openbsd-471cb1a71c9be6c2aa1b1c74bdd8965585a868ff.zip |
Do not suggest using BUF_strdup() preferably to strdup() for fallacious
reasons.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libssl/src/doc/crypto/BUF_MEM_new.pod | 5 |
1 files changed, 1 insertions, 4 deletions
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 b761859086..a83f46f896 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,7 @@ B<len>. Any data already in the buffer is preserved if it increases in | |||
45 | size. | 45 | size. |
46 | 46 | ||
47 | BUF_strdup() copies a null terminated string into a block of allocated memory | 47 | BUF_strdup() copies a null terminated string into a block of allocated memory |
48 | and returns a pointer to the allocated block. Unlike the standard C library | 48 | and returns a pointer to the allocated block. |
49 | strdup() this function uses OPENSSL_malloc() and so should be used in | ||
50 | preference to the standard library strdup() because it can be used for memory | ||
51 | leak checking or replacing the malloc() function. | ||
52 | 49 | ||
53 | The memory allocated from BUF_strdup() should be freed up using the | 50 | The memory allocated from BUF_strdup() should be freed up using the |
54 | OPENSSL_free() function. | 51 | OPENSSL_free() function. |