if ((n->da->type == PW_TYPE_TLV) &&
(n->vp_tlv != NULL)) {
- n->vp_tlv = talloc_size(n, n->length);
+ n->vp_tlv = talloc_array(n, uint8_t, n->length);
memcpy(n->vp_tlv, vp->vp_tlv, n->length);
}
if ((n->da->type == PW_TYPE_TLV) &&
(n->vp_tlv != NULL)) {
- n->vp_tlv = talloc_size(n, n->length);
+ n->vp_tlv = talloc_array(n, uint8_t, n->length);
memcpy(n->vp_tlv, vp->vp_tlv, n->length);
}
vp->length = size >> 1;
if (size > 2*sizeof(vp->vp_octets)) {
- us = vp->vp_tlv = talloc_size(vp, vp->length);
+ us = vp->vp_tlv = talloc_array(vp, uint8_t, vp->length);
if (!us) {
fr_strerror_printf("Out of memory.");
return FALSE;
if (vp->length < length) {
TALLOC_FREE(vp->vp_tlv);
}
- vp->vp_tlv = talloc_size(vp, length);
+ vp->vp_tlv = talloc_array(vp, uint8_t, length);
if (!vp->vp_tlv) {
fr_strerror_printf("No memory");
return FALSE;
vp->length = size >> 1;
if (vp->length > sizeof(vp->vp_octets)) {
- vp->vp_tlv = talloc_size(vp, vp->length);
+ vp->vp_tlv = talloc_array(vp, uint8_t, vp->length);
if (!vp->vp_tlv) {
fr_strerror_printf("Out of memory");
talloc_free(vp);