From 4316a36a7c98a5e5a0a20b453115611c55a9eb45 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Tue, 4 Feb 2014 15:14:51 +0100 Subject: [PATCH] memory leak in getdns_apply_network_result --- src/util-internal.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/util-internal.c b/src/util-internal.c index df01afdb..b05bf92d 100644 --- a/src/util-internal.c +++ b/src/util-internal.c @@ -575,10 +575,7 @@ validate_extensions(struct getdns_dict * extensions) getdns_return_t getdns_apply_network_result(getdns_network_req* netreq, struct ub_result* ub_res) { - ldns_buffer *result = ldns_buffer_new(ub_res->answer_len); - if (!result) { - return GETDNS_RETURN_GENERIC_ERROR; - } + ldns_status r = ldns_wire2pkt(&(netreq->result), ub_res->answer_packet, ub_res->answer_len); if (r != LDNS_STATUS_OK) {