diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-11-24 17:02:49 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-11-24 17:02:49 +0000 |
commit | 516f76fd2cdc1a106230fe1a9ffe3437ba99fb09 (patch) | |
tree | 763a444e3f1374cb2eaafa5e1069baf68bab6fc3 | |
parent | 5a02ac6e5b31ab588b2d80fde4843a87cec25198 (diff) |
Move new function CRYPTO_strdup to mem_dbg.c because mem.c is excluded in
a fips build.
-rw-r--r-- | crypto/mem.c | 8 | ||||
-rw-r--r-- | crypto/mem_dbg.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/crypto/mem.c b/crypto/mem.c index 3d839b9610..00ebaf0b9b 100644 --- a/crypto/mem.c +++ b/crypto/mem.c @@ -341,14 +341,6 @@ void *CRYPTO_malloc(int num, const char *file, int line) return ret; } -char *CRYPTO_strdup(const char *str, const char *file, int line) - { - char *ret = CRYPTO_malloc(strlen(str)+1, file, line); - - strcpy(ret, str); - return ret; - } - void *CRYPTO_realloc(void *str, int num, const char *file, int line) { void *ret = NULL; diff --git a/crypto/mem_dbg.c b/crypto/mem_dbg.c index 19376a1814..dfeb084799 100644 --- a/crypto/mem_dbg.c +++ b/crypto/mem_dbg.c @@ -807,3 +807,11 @@ void CRYPTO_malloc_debug_init(void) CRYPTO_dbg_pop_info, CRYPTO_dbg_remove_all_info); } + +char *CRYPTO_strdup(const char *str, const char *file, int line) + { + char *ret = CRYPTO_malloc(strlen(str)+1, file, line); + + strcpy(ret, str); + return ret; + } |