summaryrefslogtreecommitdiffstats
path: root/crypto/buffer
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/buffer')
-rw-r--r--crypto/buffer/buffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index dfa5c23d1d..48618a4435 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -42,6 +42,8 @@ BUF_MEM *BUF_MEM_new(void)
void BUF_MEM_free(BUF_MEM *a)
{
+ if (a == NULL)
+ return;
if (a->data != NULL) {
if (a->flags & BUF_MEM_FLAG_SECURE)
OPENSSL_secure_clear_free(a->data, a->max);