aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/buffer
diff options
context:
space:
mode:
authorBen Laurie <ben@openssl.org>1999-01-07 19:15:59 +0000
committerBen Laurie <ben@openssl.org>1999-01-07 19:15:59 +0000
commite03ddfae7ea7c27193d3f7c0eaa1d01704647d77 (patch)
tree7cf2e8444b222a3a52c4735e0415916bb81c4494 /crypto/buffer
parent6fa89f94c4452be54577eb071891d77c9e2abe16 (diff)
downloadopenssl-e03ddfae7ea7c27193d3f7c0eaa1d01704647d77.tar.gz
Accept NULL in *_free.
Diffstat (limited to 'crypto/buffer')
-rw-r--r--crypto/buffer/buffer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/buffer/buffer.c b/crypto/buffer/buffer.c
index 7e8af9e2fa..b160a74a47 100644
--- a/crypto/buffer/buffer.c
+++ b/crypto/buffer/buffer.c
@@ -79,6 +79,9 @@ BUF_MEM *BUF_MEM_new()
void BUF_MEM_free(a)
BUF_MEM *a;
{
+ if(a == NULL)
+ return;
+
if (a->data != NULL)
{
memset(a->data,0,(unsigned int)a->max);