Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-04-22 23:17:58 +0300
committerAdam Langley <agl@google.com>2015-05-05 02:16:19 +0300
commit2755a3eda33684e05d90644aec25376e261506c4 (patch)
treeaf16d54922bf8f8b201ffbe3d0e3212910f5c5a3 /ssl/d1_both.c
parentd8b65c884423f271487f5ab080cbf12dba41f817 (diff)
Remove unnecessary NULL checks, part 5.
Finally, the ssl stack. Change-Id: Iea10e302825947da36ad46eaf3e8e2bce060fde2 Reviewed-on: https://boringssl-review.googlesource.com/4518 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r--ssl/d1_both.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index ec2d920d..85b0af9c 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -199,12 +199,8 @@ void dtls1_hm_fragment_free(hm_fragment *frag) {
if (frag == NULL) {
return;
}
- if (frag->fragment) {
- OPENSSL_free(frag->fragment);
- }
- if (frag->reassembly) {
- OPENSSL_free(frag->reassembly);
- }
+ OPENSSL_free(frag->fragment);
+ OPENSSL_free(frag->reassembly);
OPENSSL_free(frag);
}
@@ -660,12 +656,8 @@ long dtls1_get_message(SSL *s, int st1, int stn, int msg_type, long max,
f_err:
ssl3_send_alert(s, SSL3_AL_FATAL, al);
err:
- if (item != NULL) {
- pitem_free(item);
- }
- if (frag != NULL) {
- dtls1_hm_fragment_free(frag);
- }
+ pitem_free(item);
+ dtls1_hm_fragment_free(frag);
*ok = 0;
return -1;
}