aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/mem.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/mem.c')
-rw-r--r--crypto/openssl/crypto/mem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/openssl/crypto/mem.c b/crypto/openssl/crypto/mem.c
index 3b5b2bbc6814..9df2a367e7e2 100644
--- a/crypto/openssl/crypto/mem.c
+++ b/crypto/openssl/crypto/mem.c
@@ -226,6 +226,9 @@ void *CRYPTO_realloc(void *str, int num, const char *file, int line)
{
void *ret = NULL;
+ if (str == NULL)
+ return CRYPTO_malloc(num, file, line);
+
if (realloc_debug_func != NULL)
realloc_debug_func(str, NULL, num, file, line, 0);
ret = realloc_func(str,num);