diff options
Diffstat (limited to 'src/lib/libssl/d1_both.c')
-rw-r--r-- | src/lib/libssl/d1_both.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libssl/d1_both.c b/src/lib/libssl/d1_both.c index 2f7dc283a0..ae7e7b457b 100644 --- a/src/lib/libssl/d1_both.c +++ b/src/lib/libssl/d1_both.c | |||
@@ -179,12 +179,12 @@ 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 *)malloc(sizeof(hm_fragment)); | 182 | frag = 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 *)malloc(frag_len); | 187 | buf = malloc(frag_len); |
188 | if (buf == NULL) { | 188 | if (buf == NULL) { |
189 | free(frag); | 189 | free(frag); |
190 | return NULL; | 190 | return NULL; |
@@ -196,7 +196,7 @@ 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 *)malloc(RSMBLY_BITMASK_SIZE(frag_len)); | 199 | bitmask = malloc(RSMBLY_BITMASK_SIZE(frag_len)); |
200 | if (bitmask == NULL) { | 200 | if (bitmask == NULL) { |
201 | if (buf != NULL) | 201 | if (buf != NULL) |
202 | free(buf); | 202 | free(buf); |