diff options
| author | miod <> | 2014-07-08 20:26:05 +0000 |
|---|---|---|
| committer | miod <> | 2014-07-08 20:26:05 +0000 |
| commit | f1bf666db21a5c7030356939277db4532d8091e6 (patch) | |
| tree | fe0a540562429a53357818cccd73451a51f7ebd5 | |
| parent | dedd7b2b0b11f652de237ab322ec339b4b49c958 (diff) | |
| download | openbsd-f1bf666db21a5c7030356939277db4532d8091e6.tar.gz openbsd-f1bf666db21a5c7030356939277db4532d8091e6.tar.bz2 openbsd-f1bf666db21a5c7030356939277db4532d8091e6.zip | |
Do not suggest using BUF_strdup() preferably to strdup() for fallacious
reasons.
Diffstat (limited to '')
| -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. |
