From: Miek Gieben Date: Wed, 16 Mar 2005 11:51:01 +0000 (+0000) Subject: another efence trigger mem thingy found X-Git-Tag: release-0.50~239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=72c43aad5b68afe11e4b2e4793b7b5b3e34eec58;p=thirdparty%2Fldns.git another efence trigger mem thingy found --- diff --git a/net.c b/net.c index 61359973..6340fe6a 100644 --- a/net.c +++ b/net.c @@ -177,7 +177,8 @@ ldns_send_udp(ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t to } /* 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; @@ -197,7 +198,7 @@ ldns_send_udp(ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t to } /* 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) {