}
/* wait for an response*/
- answer = XMALLOC(uint8_t, MAX_PACKETLEN);
+ /*answer = XMALLOC(uint8_t, MAX_PACKETLEN);*/
+ answer = (uint8_t*) malloc(MAX_PACKETLEN);
if (!answer) {
printf("respons alloc error\n");
return NULL;
}
/* resize accordingly */
- XREALLOC(answer, uint8_t *, (size_t) bytes);
+ answer = XREALLOC(answer, uint8_t *, (size_t) bytes);
if (ldns_wire2pkt(&answer_pkt, answer, (size_t) bytes) !=
LDNS_STATUS_OK) {