Move new function CRYPTO_strdup to mem_dbg.c because mem.c is excluded in

a fips build.
This commit is contained in:
Dr. Stephen Henson
2008-11-24 17:02:49 +00:00
parent 5a02ac6e5b
commit 516f76fd2c
2 changed files with 8 additions and 8 deletions

View File

@@ -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;

View File

@@ -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;
}