diff options
author | David Benjamin <davidben@chromium.org> | 2015-04-22 20:38:00 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-05-05 01:58:13 +0300 |
commit | 5d1ec73b0f3e21c9aae8c8253d5213e3d433959a (patch) | |
tree | ca1b9aaeaa30da569a3ed0cdf43b9492fd151e16 /ssl/d1_both.c | |
parent | 4fcc2e2031b1ce4da39b5c402208abe8cd0ea3c6 (diff) |
Require that FOO_free functions do nothing on NULL.
This is consistent with C's free function and upstream's convention.
Change-Id: I83f6e2f5824e28f69a9916e580dc2d8cb3b94234
Reviewed-on: https://boringssl-review.googlesource.com/4512
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r-- | ssl/d1_both.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c index 4e084af7..ec2d920d 100644 --- a/ssl/d1_both.c +++ b/ssl/d1_both.c @@ -196,6 +196,9 @@ static hm_fragment *dtls1_hm_fragment_new(unsigned long frag_len, } void dtls1_hm_fragment_free(hm_fragment *frag) { + if (frag == NULL) { + return; + } if (frag->fragment) { OPENSSL_free(frag->fragment); } |