summaryrefslogtreecommitdiffstats
path: root/ssl/d1_both.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 14:37:16 -0400
committerRich Salz <rsalz@openssl.org>2015-05-01 14:37:16 -0400
commit25aaa98aa249d26391c1994d2de449562c8b8b99 (patch)
tree6f83efd87fa9fd832e8a456e9686143a29f1dab3 /ssl/d1_both.c
parent666964780a245c14e8f0eb6e13dd854a37387ea9 (diff)
free NULL cleanup -- coda
After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson <tjh@openssl.org>
Diffstat (limited to 'ssl/d1_both.c')
-rw-r--r--ssl/d1_both.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ssl/d1_both.c b/ssl/d1_both.c
index 7b7f8760d1..3af3ba15cc 100644
--- a/ssl/d1_both.c
+++ b/ssl/d1_both.c
@@ -203,7 +203,8 @@ static hm_fragment *dtls1_hm_fragment_new(unsigned long frag_len,
void dtls1_hm_fragment_free(hm_fragment *frag)
{
-
+ if (!frag)
+ return;
if (frag->msg_header.is_ccs) {
EVP_CIPHER_CTX_free(frag->msg_header.
saved_retransmit_state.enc_write_ctx);
@@ -724,7 +725,7 @@ dtls1_reassemble_fragment(SSL *s, const struct hm_header_st *msg_hdr, int *ok)
return DTLS1_HM_FRAGMENT_RETRY;
err:
- if (frag != NULL && item == NULL)
+ if (item == NULL)
dtls1_hm_fragment_free(frag);
*ok = 0;
return i;
@@ -821,7 +822,7 @@ dtls1_process_out_of_seq_message(SSL *s, const struct hm_header_st *msg_hdr,
return DTLS1_HM_FRAGMENT_RETRY;
err:
- if (frag != NULL && item == NULL)
+ if (item == NULL)
dtls1_hm_fragment_free(frag);
*ok = 0;
return i;