From 2a6cbd2f8b46dde56b0a3d741a4a8f9bb639c322 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Philipp=20T=C3=B6lke?= Date: Sat, 5 Mar 2011 11:17:10 +0000 Subject: [PATCH] valgrind-clean --- src/vpn/gnunet-service-dns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vpn/gnunet-service-dns.c b/src/vpn/gnunet-service-dns.c index a9d938372..8286b7abd 100644 --- a/src/vpn/gnunet-service-dns.c +++ b/src/vpn/gnunet-service-dns.c @@ -197,6 +197,8 @@ send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { unsigned short id = pdns->s.id; + free_parsed_dns_packet(pdns); + if (query_states[id].valid != GNUNET_YES) return; query_states[id].valid = GNUNET_NO; @@ -208,8 +210,7 @@ send_rev_query(void * cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + sizeof(struct dns_query_line) \ + 2 /* To hold the pointer (as defined in RFC1035) to the name */ \ + sizeof(struct dns_record_line) - 1 \ - - 2 /* We do not know the lenght of the answer yet*/ \ - - 2 /* No idea why... */ ; + - 2 /* We do not know the lenght of the answer yet*/; struct answer_packet_list* answer = GNUNET_malloc(len + 2*sizeof(struct answer_packet_list*)); memset(answer, 0, len + 2*sizeof(struct answer_packet_list*)); -- 2.25.1