aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:34 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:34 +0200
commite31c1d4a9f78c4e31fda1f98fe349b33abdd01a2 (patch)
tree61df772a93f7f21af7c715ddd4b9a3f1a50e0509 /src/dns
parent1437556645417e6302862845e7ebcbd4c9908357 (diff)
downloadgnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz
gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/gnunet-dns-monitor.c2
-rw-r--r--src/dns/gnunet-dns-redirector.c2
-rw-r--r--src/dns/gnunet-service-dns.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/src/dns/gnunet-dns-monitor.c b/src/dns/gnunet-dns-monitor.c
index f6c0d0660..d9830baa4 100644
--- a/src/dns/gnunet-dns-monitor.c
+++ b/src/dns/gnunet-dns-monitor.c
@@ -233,7 +233,7 @@ display_record (const struct GNUNET_DNSPARSER_Record *record)
233 (unsigned int) (GNUNET_TIME_absolute_get_remaining ( 233 (unsigned int) (GNUNET_TIME_absolute_get_remaining (
234 record->expiration_time).rel_value_us / 1000LL 234 record->expiration_time).rel_value_us / 1000LL
235 / 1000LL)); 235 / 1000LL));
236 GNUNET_free_non_null (tmp); 236 GNUNET_free (tmp);
237} 237}
238 238
239 239
diff --git a/src/dns/gnunet-dns-redirector.c b/src/dns/gnunet-dns-redirector.c
index 606864c8a..835497dba 100644
--- a/src/dns/gnunet-dns-redirector.c
+++ b/src/dns/gnunet-dns-redirector.c
@@ -172,7 +172,7 @@ modify_request (void *cls,
172 "Injecting modified DNS response\n"); 172 "Injecting modified DNS response\n");
173 GNUNET_DNS_request_answer (rh, len, buf); 173 GNUNET_DNS_request_answer (rh, len, buf);
174 } 174 }
175 GNUNET_free_non_null (buf); 175 GNUNET_free (buf);
176} 176}
177 177
178 178
diff --git a/src/dns/gnunet-service-dns.c b/src/dns/gnunet-service-dns.c
index 25fbcf430..1cb238add 100644
--- a/src/dns/gnunet-service-dns.c
+++ b/src/dns/gnunet-service-dns.c
@@ -257,7 +257,7 @@ static struct GNUNET_DNSSTUB_Context *dnsstub;
257static void 257static void
258cleanup_rr (struct RequestRecord *rr) 258cleanup_rr (struct RequestRecord *rr)
259{ 259{
260 GNUNET_free_non_null (rr->payload); 260 GNUNET_free (rr->payload);
261 rr->payload = NULL; 261 rr->payload = NULL;
262 rr->payload_length = 0; 262 rr->payload_length = 0;
263 GNUNET_array_grow (rr->client_wait_list, 263 GNUNET_array_grow (rr->client_wait_list,
@@ -280,7 +280,7 @@ cleanup_task (void *cls GNUNET_UNUSED)
280 hijacker = NULL; 280 hijacker = NULL;
281 } 281 }
282 for (unsigned int i = 0; i < 8; i++) 282 for (unsigned int i = 0; i < 8; i++)
283 GNUNET_free_non_null (helper_argv[i]); 283 GNUNET_free (helper_argv[i]);
284 for (unsigned int i = 0; i <= UINT16_MAX; i++) 284 for (unsigned int i = 0; i <= UINT16_MAX; i++)
285 cleanup_rr (&requests[i]); 285 cleanup_rr (&requests[i]);
286 if (NULL != stats) 286 if (NULL != stats)
@@ -762,7 +762,7 @@ process_dns_result (void *cls,
762 LOG (GNUNET_ERROR_TYPE_DEBUG, 762 LOG (GNUNET_ERROR_TYPE_DEBUG,
763 "Got a response from the stub resolver for DNS request %llu intercepted locally!\n", 763 "Got a response from the stub resolver for DNS request %llu intercepted locally!\n",
764 (unsigned long long) rr->request_id); 764 (unsigned long long) rr->request_id);
765 GNUNET_free_non_null (rr->payload); 765 GNUNET_free (rr->payload);
766 rr->payload = GNUNET_malloc (r); 766 rr->payload = GNUNET_malloc (r);
767 GNUNET_memcpy (rr->payload, 767 GNUNET_memcpy (rr->payload,
768 dns, 768 dns,
@@ -862,7 +862,7 @@ handle_client_response (void *cls,
862 next_phase (rr); 862 next_phase (rr);
863 return; 863 return;
864 } 864 }
865 GNUNET_free_non_null (rr->payload); 865 GNUNET_free (rr->payload);
866 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 866 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
867 "Changing DNS reply according to client specifications\n"); 867 "Changing DNS reply according to client specifications\n");
868 rr->payload = GNUNET_malloc (msize); 868 rr->payload = GNUNET_malloc (msize);
@@ -1005,7 +1005,7 @@ process_helper_messages (void *cls,
1005 rr = &requests[dns->id]; 1005 rr = &requests[dns->id];
1006 1006
1007 /* clean up from previous request */ 1007 /* clean up from previous request */
1008 GNUNET_free_non_null (rr->payload); 1008 GNUNET_free (rr->payload);
1009 rr->payload = NULL; 1009 rr->payload = NULL;
1010 GNUNET_array_grow (rr->client_wait_list, 1010 GNUNET_array_grow (rr->client_wait_list,
1011 rr->client_wait_list_length, 1011 rr->client_wait_list_length,
@@ -1115,7 +1115,7 @@ run (void *cls,
1115 "dns", 1115 "dns",
1116 "DNS_EXIT", 1116 "DNS_EXIT",
1117 _ ("need a valid IPv4 or IPv6 address\n")); 1117 _ ("need a valid IPv4 or IPv6 address\n"));
1118 GNUNET_free_non_null (dns_exit); 1118 GNUNET_free (dns_exit);
1119 } 1119 }
1120 binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-dns"); 1120 binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-dns");
1121 1121