summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/buffer/buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/buffer/buffer.c')
-rw-r--r--lib/libcrypto/buffer/buffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/libcrypto/buffer/buffer.c b/lib/libcrypto/buffer/buffer.c
index 71784693be3..be765087e45 100644
--- a/lib/libcrypto/buffer/buffer.c
+++ b/lib/libcrypto/buffer/buffer.c
@@ -115,10 +115,7 @@ BUF_MEM_grow(BUF_MEM *str, size_t len)
return 0;
}
n = (len + 3) / 3 * 4;
- if (str->data == NULL)
- ret = malloc(n);
- else
- ret = realloc(str->data, n);
+ ret = realloc(str->data, n);
if (ret == NULL) {
BUFerr(BUF_F_BUF_MEM_GROW, ERR_R_MALLOC_FAILURE);
len = 0;