diff options
Diffstat (limited to 'src/lib/libssl/d1_both.c')
| -rw-r--r-- | src/lib/libssl/d1_both.c | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 731245c6a6..2f7dc283a0 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
| @@ -179,14 +179,14 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly) | |||
| 179 | unsigned char *buf = NULL; | 179 | unsigned char *buf = NULL; | 
| 180 | unsigned char *bitmask = NULL; | 180 | unsigned char *bitmask = NULL; | 
| 181 | 181 | ||
| 182 | frag = (hm_fragment *)OPENSSL_malloc(sizeof(hm_fragment)); | 182 | frag = (hm_fragment *)malloc(sizeof(hm_fragment)); | 
| 183 | if (frag == NULL) | 183 | if (frag == NULL) | 
| 184 | return NULL; | 184 | return NULL; | 
| 185 | 185 | ||
| 186 | if (frag_len) { | 186 | if (frag_len) { | 
| 187 | buf = (unsigned char *)OPENSSL_malloc(frag_len); | 187 | buf = (unsigned char *)malloc(frag_len); | 
| 188 | if (buf == NULL) { | 188 | if (buf == NULL) { | 
| 189 | OPENSSL_free(frag); | 189 | free(frag); | 
| 190 | return NULL; | 190 | return NULL; | 
| 191 | } | 191 | } | 
| 192 | } | 192 | } | 
| @@ -196,11 +196,11 @@ dtls1_hm_fragment_new(unsigned long frag_len, int reassembly) | |||
| 196 | 196 | ||
| 197 | /* Initialize reassembly bitmask if necessary */ | 197 | /* Initialize reassembly bitmask if necessary */ | 
| 198 | if (reassembly) { | 198 | if (reassembly) { | 
| 199 | bitmask = (unsigned char *)OPENSSL_malloc(RSMBLY_BITMASK_SIZE(frag_len)); | 199 | bitmask = (unsigned char *)malloc(RSMBLY_BITMASK_SIZE(frag_len)); | 
| 200 | if (bitmask == NULL) { | 200 | if (bitmask == NULL) { | 
| 201 | if (buf != NULL) | 201 | if (buf != NULL) | 
| 202 | OPENSSL_free(buf); | 202 | free(buf); | 
| 203 | OPENSSL_free(frag); | 203 | free(frag); | 
| 204 | return NULL; | 204 | return NULL; | 
| 205 | } | 205 | } | 
| 206 | memset(bitmask, 0, RSMBLY_BITMASK_SIZE(frag_len)); | 206 | memset(bitmask, 0, RSMBLY_BITMASK_SIZE(frag_len)); | 
| @@ -220,10 +220,10 @@ dtls1_hm_fragment_free(hm_fragment *frag) | |||
| 220 | EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash); | 220 | EVP_MD_CTX_destroy(frag->msg_header.saved_retransmit_state.write_hash); | 
| 221 | } | 221 | } | 
| 222 | if (frag->fragment) | 222 | if (frag->fragment) | 
| 223 | OPENSSL_free(frag->fragment); | 223 | free(frag->fragment); | 
| 224 | if (frag->reassembly) | 224 | if (frag->reassembly) | 
| 225 | OPENSSL_free(frag->reassembly); | 225 | free(frag->reassembly); | 
| 226 | OPENSSL_free(frag); | 226 | free(frag); | 
| 227 | } | 227 | } | 
| 228 | 228 | ||
| 229 | /* send s->init_buf in records of type 'type' (SSL3_RT_HANDSHAKE or SSL3_RT_CHANGE_CIPHER_SPEC) */ | 229 | /* send s->init_buf in records of type 'type' (SSL3_RT_HANDSHAKE or SSL3_RT_CHANGE_CIPHER_SPEC) */ | 
| @@ -636,7 +636,7 @@ dtls1_reassemble_fragment(SSL *s, struct hm_header_st* msg_hdr, int *ok) { | |||
| 636 | is_complete); | 636 | is_complete); | 
| 637 | 637 | ||
| 638 | if (is_complete) { | 638 | if (is_complete) { | 
| 639 | OPENSSL_free(frag->reassembly); | 639 | free(frag->reassembly); | 
| 640 | frag->reassembly = NULL; | 640 | frag->reassembly = NULL; | 
| 641 | } | 641 | } | 
| 642 | 642 | ||
| @@ -660,7 +660,7 @@ err: | |||
| 660 | if (frag != NULL) | 660 | if (frag != NULL) | 
| 661 | dtls1_hm_fragment_free(frag); | 661 | dtls1_hm_fragment_free(frag); | 
| 662 | if (item != NULL) | 662 | if (item != NULL) | 
| 663 | OPENSSL_free(item); | 663 | free(item); | 
| 664 | *ok = 0; | 664 | *ok = 0; | 
| 665 | return i; | 665 | return i; | 
| 666 | } | 666 | } | 
| @@ -742,7 +742,7 @@ err: | |||
| 742 | if (frag != NULL) | 742 | if (frag != NULL) | 
| 743 | dtls1_hm_fragment_free(frag); | 743 | dtls1_hm_fragment_free(frag); | 
| 744 | if (item != NULL) | 744 | if (item != NULL) | 
| 745 | OPENSSL_free(item); | 745 | free(item); | 
| 746 | *ok = 0; | 746 | *ok = 0; | 
| 747 | return i; | 747 | return i; | 
| 748 | } | 748 | } | 
