Move new function CRYPTO_strdup to mem_dbg.c because mem.c is excluded in
a fips build.
This commit is contained in:
@@ -341,14 +341,6 @@ void *CRYPTO_malloc(int num, const char *file, int line)
|
|||||||
return ret;
|
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 *CRYPTO_realloc(void *str, int num, const char *file, int line)
|
||||||
{
|
{
|
||||||
void *ret = NULL;
|
void *ret = NULL;
|
||||||
|
@@ -807,3 +807,11 @@ void CRYPTO_malloc_debug_init(void)
|
|||||||
CRYPTO_dbg_pop_info,
|
CRYPTO_dbg_pop_info,
|
||||||
CRYPTO_dbg_remove_all_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;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user