frag->msg_header.frag_len = frag->msg_header.msg_len;
frag->msg_header.frag_off = 0;
} else
- frag = (hm_fragment*) item->data;
+ frag = (hm_fragment*)item->data;
/* If message is already reassembled, this must be a
* retransmit and can be dropped.
return DTLS1_HM_FRAGMENT_RETRY;
err:
- if (frag != NULL)
+ if (item == NULL && frag != NULL)
dtls1_hm_fragment_free(frag);
- if (item != NULL)
- free(item);
*ok = 0;
return i;
}
return DTLS1_HM_FRAGMENT_RETRY;
err:
- if (frag != NULL)
+ if (item == NULL && frag != NULL)
dtls1_hm_fragment_free(frag);
- if (item != NULL)
- free(item);
*ok = 0;
return i;
}
frag->msg_header.frag_len = frag->msg_header.msg_len;
frag->msg_header.frag_off = 0;
} else
- frag = (hm_fragment*) item->data;
+ frag = (hm_fragment*)item->data;
/* If message is already reassembled, this must be a
* retransmit and can be dropped.
return DTLS1_HM_FRAGMENT_RETRY;
err:
- if (frag != NULL)
+ if (item == NULL && frag != NULL)
dtls1_hm_fragment_free(frag);
- if (item != NULL)
- free(item);
*ok = 0;
return i;
}
return DTLS1_HM_FRAGMENT_RETRY;
err:
- if (frag != NULL)
+ if (item == NULL && frag != NULL)
dtls1_hm_fragment_free(frag);
- if (item != NULL)
- free(item);
*ok = 0;
return i;
}