51 |
{ |
{ |
52 |
if (!p) |
if (!p) |
53 |
return; |
return; |
54 |
if (p->type == TYPE_STRING || p->eval) |
if (p->type == TYPE_STRING || p->eval_type != eval_const) |
55 |
efree(p->avp_strvalue); |
efree(p->avp_strvalue); |
56 |
efree(p); |
efree(p); |
57 |
} |
} |
66 |
|
|
67 |
memcpy(ret, vp, sizeof(VALUE_PAIR)); |
memcpy(ret, vp, sizeof(VALUE_PAIR)); |
68 |
ret->next = NULL; |
ret->next = NULL; |
69 |
if (ret->type == TYPE_STRING || ret->eval) { |
if (ret->type == TYPE_STRING || ret->eval_type != eval_const) { |
70 |
ret->avp_strlength = vp->avp_strlength; |
ret->avp_strlength = vp->avp_strlength; |
71 |
ret->avp_strvalue = emalloc(ret->avp_strlength+1); |
ret->avp_strvalue = emalloc(ret->avp_strlength+1); |
72 |
memcpy(ret->avp_strvalue, vp->avp_strvalue, |
memcpy(ret->avp_strvalue, vp->avp_strvalue, |
421 |
for ( ; from; from = from->next) { |
for ( ; from; from = from->next) { |
422 |
temp = avp_alloc(); |
temp = avp_alloc(); |
423 |
memcpy(temp, from, sizeof(VALUE_PAIR)); |
memcpy(temp, from, sizeof(VALUE_PAIR)); |
424 |
if (temp->type == TYPE_STRING || temp->eval) { |
if (temp->type == TYPE_STRING || temp->eval_type != eval_const) { |
425 |
char *p = emalloc(temp->avp_strlength+1); |
char *p = emalloc(temp->avp_strlength+1); |
426 |
memcpy(p, temp->avp_strvalue, temp->avp_strlength); |
memcpy(p, temp->avp_strvalue, temp->avp_strlength); |
427 |
p[temp->avp_strlength] = 0; |
p[temp->avp_strlength] = 0; |