valgrind-clean
authorPhilipp Tölke <toelke@in.tum.de>
Sat, 5 Mar 2011 11:17:10 +0000 (11:17 +0000)
committerPhilipp Tölke <toelke@in.tum.de>
Sat, 5 Mar 2011 11:17:10 +0000 (11:17 +0000)
src/vpn/gnunet-service-dns.c

index a9d93837228d76ac534849de3076f2611f383071..8286b7abda62b7c947f3cd4d4991e0d310da9899 100644 (file)
@@ -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*));