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>
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user