- new->tlv = aim_createtlv();
- new->tlv->type = type;
- new->tlv->length = len;
- new->tlv->value = (u_char *)malloc(new->tlv->length*sizeof(u_char));
- memcpy(new->tlv->value, str, new->tlv->length);
+ newtlv->tlv = aim_createtlv();
+ newtlv->tlv->type = type;
+ newtlv->tlv->length = len;
+ newtlv->tlv->value = (unsigned char *)malloc(newtlv->tlv->length*sizeof(unsigned char));
+ memcpy(newtlv->tlv->value, str, newtlv->tlv->length);