aboutsummaryrefslogtreecommitdiff
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
parent1437556645417e6302862845e7ebcbd4c9908357 (diff)
downloadgnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz
gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip
GNUNET_free_non_null -> GNUNET_free
-rw-r--r--src/abd/gnunet-abd.c2
-rw-r--r--src/abd/gnunet-service-abd.c18
-rw-r--r--src/arm/arm_api.c2
-rw-r--r--src/arm/gnunet-service-arm.c18
-rw-r--r--src/ats-tests/ats-testing-experiment.c10
-rw-r--r--src/ats-tests/ats-testing.c2
-rw-r--r--src/ats-tests/gnunet-ats-sim.c2
-rw-r--r--src/ats-tests/gnunet-solver-eval.c10
-rw-r--r--src/ats-tool/gnunet-ats.c4
-rw-r--r--src/ats/gnunet-ats-solver-eval.c20
-rw-r--r--src/ats/perf_ats_solver.c12
-rw-r--r--src/ats/plugin_ats_proportional.c2
-rw-r--r--src/ats/test_ats_lib.c4
-rw-r--r--src/cadet/cadet_api.c2
-rw-r--r--src/cadet/gnunet-service-cadet.c2
-rw-r--r--src/cadet/gnunet-service-cadet_hello.c2
-rw-r--r--src/cadet/gnunet-service-cadet_peer.c6
-rw-r--r--src/consensus/gnunet-service-consensus.c2
-rw-r--r--src/conversation/gnunet-conversation.c4
-rw-r--r--src/core/core_api.c2
-rw-r--r--src/core/test_core_api_reliability.c6
-rw-r--r--src/curl/curl.c4
-rw-r--r--src/datacache/plugin_datacache_heap.c4
-rw-r--r--src/datacache/plugin_datacache_sqlite.c2
-rw-r--r--src/datastore/gnunet-service-datastore.c6
-rw-r--r--src/datastore/plugin_datastore_sqlite.c8
-rw-r--r--src/datastore/test_datastore_api.c2
-rw-r--r--src/datastore/test_datastore_api_management.c2
-rw-r--r--src/dht/dht_api.c2
-rw-r--r--src/dht/gnunet-service-dht.c4
-rw-r--r--src/dht/gnunet-service-dht_clients.c10
-rw-r--r--src/dht/gnunet-service-dht_hello.c2
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c4
-rw-r--r--src/dht/gnunet_dht_profiler.c2
-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
-rw-r--r--src/exit/gnunet-daemon-exit.c18
-rw-r--r--src/fs/fs_api.c82
-rw-r--r--src/fs/fs_directory.c16
-rw-r--r--src/fs/fs_dirmetascan.c2
-rw-r--r--src/fs/fs_download.c18
-rw-r--r--src/fs/fs_file_information.c10
-rw-r--r--src/fs/fs_namespace.c6
-rw-r--r--src/fs/fs_publish.c14
-rw-r--r--src/fs/fs_search.c22
-rw-r--r--src/fs/fs_sharetree.c4
-rw-r--r--src/fs/fs_test_lib.c4
-rw-r--r--src/fs/fs_tree.c2
-rw-r--r--src/fs/fs_unindex.c8
-rw-r--r--src/fs/fs_uri.c6
-rw-r--r--src/fs/gnunet-auto-share.c6
-rw-r--r--src/fs/gnunet-directory.c4
-rw-r--r--src/fs/gnunet-publish.c6
-rw-r--r--src/fs/gnunet-search.c4
-rw-r--r--src/fs/gnunet-service-fs_pr.c4
-rw-r--r--src/fs/test_fs_file_information.c4
-rw-r--r--src/fs/test_fs_namespace.c2
-rw-r--r--src/gns/gns_tld_api.c2
-rw-r--r--src/gns/gnunet-gns-import.c4
-rw-r--r--src/gns/gnunet-gns-proxy.c30
-rw-r--r--src/gns/gnunet-service-gns_resolver.c12
-rw-r--r--src/gns/plugin_gnsrecord_gns.c6
-rw-r--r--src/gns/plugin_rest_gns.c2
-rw-r--r--src/gns/test_gns_proxy.c8
-rw-r--r--src/gnsrecord/gnsrecord.c2
-rw-r--r--src/gnsrecord/plugin_gnsrecord_dns.c6
-rw-r--r--src/hello/hello-ng.c2
-rw-r--r--src/hello/hello.c2
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_client.c16
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_server.c6
-rw-r--r--src/hostlist/test_gnunet_daemon_hostlist_learning.c2
-rw-r--r--src/identity/plugin_rest_identity.c2
-rw-r--r--src/include/gnunet_common.h31
-rw-r--r--src/mysql/mysql.c6
-rw-r--r--src/namecache/plugin_namecache_sqlite.c2
-rw-r--r--src/namestore/gnunet-namestore.c4
-rw-r--r--src/namestore/gnunet-service-namestore.c4
-rw-r--r--src/namestore/plugin_namestore_sqlite.c2
-rw-r--r--src/namestore/plugin_rest_namestore.c4
-rw-r--r--src/namestore/test_namestore_api_lookup_nick.c2
-rw-r--r--src/namestore/test_namestore_api_monitoring.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_nick.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_specific_zone.c6
-rw-r--r--src/namestore/test_namestore_api_zone_iteration_stop.c6
-rw-r--r--src/nat-auto/gnunet-service-nat-auto_legacy.c4
-rw-r--r--src/nat/gnunet-nat.c8
-rw-r--r--src/nat/gnunet-service-nat.c6
-rw-r--r--src/nat/test_nat.c2
-rw-r--r--src/peerinfo-tool/gnunet-peerinfo.c6
-rw-r--r--src/peerinfo-tool/plugin_rest_peerinfo.c6
-rw-r--r--src/peerinfo/gnunet-service-peerinfo.c12
-rw-r--r--src/peerstore/peerstore_api.c2
-rw-r--r--src/peerstore/plugin_peerstore_flat.c2
-rw-r--r--src/peerstore/plugin_peerstore_sqlite.c2
-rw-r--r--src/pq/pq_connect.c16
-rw-r--r--src/pq/pq_prepare.c2
-rw-r--r--src/pt/test_gns_vpn.c2
-rw-r--r--src/pt/test_gnunet_vpn.c2
-rw-r--r--src/reclaim/gnunet-reclaim.c2
-rw-r--r--src/reclaim/gnunet-service-reclaim_tickets.c2
-rw-r--r--src/reclaim/oidc_helper.c6
-rw-r--r--src/reclaim/plugin_rest_openid_connect.c48
-rw-r--r--src/reclaim/plugin_rest_reclaim.c2
-rw-r--r--src/reclaim/reclaim_api.c2
-rw-r--r--src/regex/gnunet-regex-profiler.c4
-rw-r--r--src/regex/gnunet-regex-simulation-profiler.c2
-rw-r--r--src/regex/regex_internal.c26
-rw-r--r--src/regex/regex_test_lib.c8
-rw-r--r--src/regex/test_regex_eval_api.c8
-rw-r--r--src/rest/gnunet-rest-server.c8
-rw-r--r--src/rps/rps_api.c2
-rw-r--r--src/set/gnunet-service-set.c4
-rw-r--r--src/set/gnunet-service-set_union_strata_estimator.c4
-rw-r--r--src/statistics/gnunet-service-statistics.c2
-rw-r--r--src/statistics/gnunet-statistics.c2
-rw-r--r--src/statistics/statistics_api.c4
-rw-r--r--src/testbed-logger/test_testbed_logger_api.c2
-rw-r--r--src/testbed/gnunet-helper-testbed.c2
-rw-r--r--src/testbed/gnunet-service-testbed.c12
-rw-r--r--src/testbed/gnunet-service-testbed_cache.c4
-rw-r--r--src/testbed/gnunet-service-testbed_connectionpool.c2
-rw-r--r--src/testbed/gnunet-service-testbed_cpustatus.c2
-rw-r--r--src/testbed/gnunet-service-testbed_links.c6
-rw-r--r--src/testbed/gnunet-service-testbed_oc.c24
-rw-r--r--src/testbed/gnunet-service-testbed_peers.c6
-rw-r--r--src/testbed/gnunet_testbed_mpi_spawn.c2
-rw-r--r--src/testbed/test_gnunet_helper_testbed.c2
-rw-r--r--src/testbed/test_testbed_api_statistics.c2
-rw-r--r--src/testbed/testbed_api.c6
-rw-r--r--src/testbed/testbed_api_hosts.c17
-rw-r--r--src/testbed/testbed_api_operations.c10
-rw-r--r--src/testbed/testbed_api_peers.c2
-rw-r--r--src/testbed/testbed_api_statistics.c4
-rw-r--r--src/testbed/testbed_api_testbed.c8
-rw-r--r--src/testbed/testbed_api_topology.c8
-rw-r--r--src/testing/gnunet-testing.c2
-rw-r--r--src/testing/test_testing_peerstartup.c2
-rw-r--r--src/testing/test_testing_peerstartup2.c2
-rw-r--r--src/testing/test_testing_sharedservices.c2
-rw-r--r--src/testing/testing.c24
-rw-r--r--src/topology/gnunet-daemon-topology.c4
-rw-r--r--src/transport/gnunet-communicator-udp.c2
-rw-r--r--src/transport/gnunet-service-transport.c4
-rw-r--r--src/transport/gnunet-service-transport_hello.c2
-rw-r--r--src/transport/gnunet-transport.c6
-rw-r--r--src/transport/plugin_transport_http_client.c12
-rw-r--r--src/transport/plugin_transport_http_common.c18
-rw-r--r--src/transport/plugin_transport_http_server.c36
-rw-r--r--src/transport/plugin_transport_tcp.c28
-rw-r--r--src/transport/plugin_transport_udp.c4
-rw-r--r--src/transport/plugin_transport_wlan.c2
-rw-r--r--src/transport/tcp_connection_legacy.c4
-rw-r--r--src/transport/tcp_service_legacy.c52
-rw-r--r--src/transport/test_http_common.c6
-rw-r--r--src/transport/transport-testing-main.c2
-rw-r--r--src/transport/transport-testing.c6
-rw-r--r--src/transport/transport_api2_core.c4
-rw-r--r--src/transport/transport_api_core.c4
-rw-r--r--src/util/bio.c16
-rw-r--r--src/util/buffer.c2
-rw-r--r--src/util/client.c10
-rw-r--r--src/util/common_allocation.c5
-rw-r--r--src/util/common_logging.c6
-rw-r--r--src/util/configuration.c12
-rw-r--r--src/util/container_bloomfilter.c2
-rw-r--r--src/util/container_meta_data.c14
-rw-r--r--src/util/disk.c4
-rw-r--r--src/util/dnsparser.c26
-rw-r--r--src/util/getopt_helpers.c4
-rw-r--r--src/util/gnunet-config.c2
-rw-r--r--src/util/gnunet-scrypt.c2
-rw-r--r--src/util/gnunet-service-resolver.c12
-rw-r--r--src/util/mq.c2
-rw-r--r--src/util/network.c2
-rw-r--r--src/util/os_installation.c8
-rw-r--r--src/util/program.c8
-rw-r--r--src/util/regex.c14
-rw-r--r--src/util/service.c40
-rw-r--r--src/util/socks.c6
-rw-r--r--src/util/strings.c2
-rw-r--r--src/util/test_common_allocation.c6
-rw-r--r--src/util/test_configuration.c2
-rw-r--r--src/util/test_container_meta_data.c2
-rw-r--r--src/util/test_crypto_symmetric.c2
-rw-r--r--src/util/test_resolver_api.c2
-rw-r--r--src/vpn/gnunet-service-vpn.c10
-rw-r--r--src/vpn/gnunet-vpn.c6
189 files changed, 705 insertions, 710 deletions
diff --git a/src/abd/gnunet-abd.c b/src/abd/gnunet-abd.c
index f7e03fb4a..963d9207a 100644
--- a/src/abd/gnunet-abd.c
+++ b/src/abd/gnunet-abd.c
@@ -723,7 +723,7 @@ sign_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
723 GNUNET_free (dele); 723 GNUNET_free (dele);
724 printf ("%s\n", res); 724 printf ("%s\n", res);
725 725
726 GNUNET_free_non_null (ego_name); 726 GNUNET_free (ego_name);
727 ego_name = NULL; 727 ego_name = NULL;
728 728
729 GNUNET_SCHEDULER_shutdown (); 729 GNUNET_SCHEDULER_shutdown ();
diff --git a/src/abd/gnunet-service-abd.c b/src/abd/gnunet-service-abd.c
index 36b0009ef..569d42295 100644
--- a/src/abd/gnunet-service-abd.c
+++ b/src/abd/gnunet-service-abd.c
@@ -364,14 +364,14 @@ print_deleset (struct DelegationSetQueueEntry *dsentry, char *text)
364static void 364static void
365cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry) 365cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry)
366{ 366{
367 GNUNET_free_non_null (ds_entry->issuer_key); 367 GNUNET_free (ds_entry->issuer_key);
368 GNUNET_free_non_null (ds_entry->issuer_attribute); 368 GNUNET_free (ds_entry->issuer_attribute);
369 GNUNET_free_non_null (ds_entry->attr_trailer); 369 GNUNET_free (ds_entry->attr_trailer);
370 // those fields are only set/used in bw search 370 // those fields are only set/used in bw search
371 if (ds_entry->from_bw) 371 if (ds_entry->from_bw)
372 { 372 {
373 GNUNET_free_non_null (ds_entry->lookup_attribute); 373 GNUNET_free (ds_entry->lookup_attribute);
374 GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation); 374 GNUNET_free (ds_entry->unresolved_attribute_delegation);
375 } 375 }
376 if (NULL != ds_entry->lookup_request) 376 if (NULL != ds_entry->lookup_request)
377 { 377 {
@@ -380,9 +380,9 @@ cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry)
380 } 380 }
381 if (NULL != ds_entry->delegation_chain_entry) 381 if (NULL != ds_entry->delegation_chain_entry)
382 { 382 {
383 GNUNET_free_non_null ( 383 GNUNET_free (
384 ds_entry->delegation_chain_entry->subject_attribute); 384 ds_entry->delegation_chain_entry->subject_attribute);
385 GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute); 385 GNUNET_free (ds_entry->delegation_chain_entry->issuer_attribute);
386 GNUNET_free (ds_entry->delegation_chain_entry); 386 GNUNET_free (ds_entry->delegation_chain_entry);
387 } 387 }
388 // Free DQ entries 388 // Free DQ entries
@@ -423,11 +423,11 @@ cleanup_handle (struct VerifyRequestHandle *vrh)
423 GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head, 423 GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head,
424 vrh->del_chain_tail, 424 vrh->del_chain_tail,
425 del_entry); 425 del_entry);
426 GNUNET_free_non_null (del_entry->delegate); 426 GNUNET_free (del_entry->delegate);
427 GNUNET_free (del_entry); 427 GNUNET_free (del_entry);
428 } 428 }
429 } 429 }
430 GNUNET_free_non_null (vrh->issuer_attribute); 430 GNUNET_free (vrh->issuer_attribute);
431 GNUNET_free (vrh); 431 GNUNET_free (vrh);
432} 432}
433 433
diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c
index 1c402a8e0..cd5f44565 100644
--- a/src/arm/arm_api.c
+++ b/src/arm/arm_api.c
@@ -774,7 +774,7 @@ start_arm_service (struct GNUNET_ARM_Handle *h,
774 } 774 }
775 GNUNET_free (binary); 775 GNUNET_free (binary);
776 GNUNET_free (quotedbinary); 776 GNUNET_free (quotedbinary);
777 GNUNET_free_non_null (config); 777 GNUNET_free (config);
778 GNUNET_free (loprefix); 778 GNUNET_free (loprefix);
779 GNUNET_free (lopostfix); 779 GNUNET_free (lopostfix);
780 if (NULL == proc) 780 if (NULL == proc)
diff --git a/src/arm/gnunet-service-arm.c b/src/arm/gnunet-service-arm.c
index 09d85ca89..5efd8b72b 100644
--- a/src/arm/gnunet-service-arm.c
+++ b/src/arm/gnunet-service-arm.c
@@ -475,7 +475,7 @@ get_server_addresses (const char *service_name,
475 (EACCES == errno)) 475 (EACCES == errno))
476 { 476 {
477 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); 477 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
478 GNUNET_free_non_null (hostname); 478 GNUNET_free (hostname);
479 GNUNET_free (unixpath); 479 GNUNET_free (unixpath);
480 return GNUNET_SYSERR; 480 return GNUNET_SYSERR;
481 } 481 }
@@ -504,7 +504,7 @@ get_server_addresses (const char *service_name,
504 _ ( 504 _ (
505 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 505 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
506 service_name); 506 service_name);
507 GNUNET_free_non_null (hostname); 507 GNUNET_free (hostname);
508 return GNUNET_SYSERR; 508 return GNUNET_SYSERR;
509 } 509 }
510 if (0 == port) 510 if (0 == port)
@@ -512,8 +512,8 @@ get_server_addresses (const char *service_name,
512 saddrs = GNUNET_new_array (2, struct sockaddr *); 512 saddrs = GNUNET_new_array (2, struct sockaddr *);
513 saddrlens = GNUNET_new_array (2, socklen_t); 513 saddrlens = GNUNET_new_array (2, socklen_t);
514 add_unixpath (saddrs, saddrlens, unixpath, abstract); 514 add_unixpath (saddrs, saddrlens, unixpath, abstract);
515 GNUNET_free_non_null (unixpath); 515 GNUNET_free (unixpath);
516 GNUNET_free_non_null (hostname); 516 GNUNET_free (hostname);
517 *addrs = saddrs; 517 *addrs = saddrs;
518 *addr_lens = saddrlens; 518 *addr_lens = saddrlens;
519 return 1; 519 return 1;
@@ -537,7 +537,7 @@ get_server_addresses (const char *service_name,
537 hostname, 537 hostname,
538 gai_strerror (ret)); 538 gai_strerror (ret));
539 GNUNET_free (hostname); 539 GNUNET_free (hostname);
540 GNUNET_free_non_null (unixpath); 540 GNUNET_free (unixpath);
541 return GNUNET_SYSERR; 541 return GNUNET_SYSERR;
542 } 542 }
543 next = res; 543 next = res;
@@ -557,7 +557,7 @@ get_server_addresses (const char *service_name,
557 hostname); 557 hostname);
558 freeaddrinfo (res); 558 freeaddrinfo (res);
559 GNUNET_free (hostname); 559 GNUNET_free (hostname);
560 GNUNET_free_non_null (unixpath); 560 GNUNET_free (unixpath);
561 return GNUNET_SYSERR; 561 return GNUNET_SYSERR;
562 } 562 }
563 resi = i; 563 resi = i;
@@ -664,7 +664,7 @@ get_server_addresses (const char *service_name,
664 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 664 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
665 } 665 }
666 } 666 }
667 GNUNET_free_non_null (unixpath); 667 GNUNET_free (unixpath);
668 *addrs = saddrs; 668 *addrs = saddrs;
669 *addr_lens = saddrlens; 669 *addr_lens = saddrlens;
670 return resi; 670 return resi;
@@ -1132,8 +1132,8 @@ free_service (struct ServiceList *sl)
1132 GNUNET_assert (GNUNET_YES == in_shutdown); 1132 GNUNET_assert (GNUNET_YES == in_shutdown);
1133 GNUNET_CONTAINER_DLL_remove (running_head, running_tail, sl); 1133 GNUNET_CONTAINER_DLL_remove (running_head, running_tail, sl);
1134 GNUNET_assert (NULL == sl->listen_head); 1134 GNUNET_assert (NULL == sl->listen_head);
1135 GNUNET_free_non_null (sl->config); 1135 GNUNET_free (sl->config);
1136 GNUNET_free_non_null (sl->binary); 1136 GNUNET_free (sl->binary);
1137 GNUNET_free (sl->name); 1137 GNUNET_free (sl->name);
1138 GNUNET_free (sl); 1138 GNUNET_free (sl);
1139} 1139}
diff --git a/src/ats-tests/ats-testing-experiment.c b/src/ats-tests/ats-testing-experiment.c
index fa379200f..9f8db1be4 100644
--- a/src/ats-tests/ats-testing-experiment.c
+++ b/src/ats-tests/ats-testing-experiment.c
@@ -88,8 +88,8 @@ free_experiment (struct Experiment *e)
88 GNUNET_free (cur); 88 GNUNET_free (cur);
89 } 89 }
90 90
91 GNUNET_free_non_null (e->name); 91 GNUNET_free (e->name);
92 GNUNET_free_non_null (e->cfg_file); 92 GNUNET_free (e->cfg_file);
93 GNUNET_free (e); 93 GNUNET_free (e);
94} 94}
95 95
@@ -332,7 +332,7 @@ load_episode (struct Experiment *e,
332 GNUNET_free (type); 332 GNUNET_free (type);
333 GNUNET_free (op_name); 333 GNUNET_free (op_name);
334 GNUNET_free (op); 334 GNUNET_free (op);
335 GNUNET_free_non_null (pref); 335 GNUNET_free (pref);
336 GNUNET_free (o); 336 GNUNET_free (o);
337 GNUNET_free (sec_name); 337 GNUNET_free (sec_name);
338 return GNUNET_SYSERR; 338 return GNUNET_SYSERR;
@@ -350,7 +350,7 @@ load_episode (struct Experiment *e,
350 GNUNET_free (type); 350 GNUNET_free (type);
351 GNUNET_free (op_name); 351 GNUNET_free (op_name);
352 GNUNET_free (op); 352 GNUNET_free (op);
353 GNUNET_free_non_null (pref); 353 GNUNET_free (pref);
354 GNUNET_free (o); 354 GNUNET_free (o);
355 GNUNET_free (sec_name); 355 GNUNET_free (sec_name);
356 return GNUNET_SYSERR; 356 return GNUNET_SYSERR;
@@ -384,7 +384,7 @@ load_episode (struct Experiment *e,
384 fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n", 384 fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n",
385 op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id); 385 op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id);
386 386
387 GNUNET_free_non_null (type); 387 GNUNET_free (type);
388 GNUNET_free (op); 388 GNUNET_free (op);
389 389
390 GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o); 390 GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o);
diff --git a/src/ats-tests/ats-testing.c b/src/ats-tests/ats-testing.c
index c7969cdfe..c6ba8533d 100644
--- a/src/ats-tests/ats-testing.c
+++ b/src/ats-tests/ats-testing.c
@@ -110,7 +110,7 @@ do_shutdown (void *cls)
110 GNUNET_TESTBED_operation_done (p->comm_op); 110 GNUNET_TESTBED_operation_done (p->comm_op);
111 p->comm_op = NULL; 111 p->comm_op = NULL;
112 } 112 }
113 GNUNET_free_non_null (p->core_connect_ops); 113 GNUNET_free (p->core_connect_ops);
114 GNUNET_free (p->partners); 114 GNUNET_free (p->partners);
115 p->partners = NULL; 115 p->partners = NULL;
116 } 116 }
diff --git a/src/ats-tests/gnunet-ats-sim.c b/src/ats-tests/gnunet-ats-sim.c
index fb3014798..15cd52e2f 100644
--- a/src/ats-tests/gnunet-ats-sim.c
+++ b/src/ats-tests/gnunet-ats-sim.c
@@ -339,7 +339,7 @@ parse_args (int argc, char *argv[])
339 { 339 {
340 if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e"))) 340 if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e")))
341 { 341 {
342 GNUNET_free_non_null (opt_exp_file); 342 GNUNET_free (opt_exp_file);
343 opt_exp_file = GNUNET_strdup (argv[c + 1]); 343 opt_exp_file = GNUNET_strdup (argv[c + 1]);
344 } 344 }
345 if (0 == strcmp (argv[c], "-l")) 345 if (0 == strcmp (argv[c], "-l"))
diff --git a/src/ats-tests/gnunet-solver-eval.c b/src/ats-tests/gnunet-solver-eval.c
index 09ddd7b2d..7a3461bf7 100644
--- a/src/ats-tests/gnunet-solver-eval.c
+++ b/src/ats-tests/gnunet-solver-eval.c
@@ -94,8 +94,8 @@ free_experiment (struct Experiment *e)
94 GNUNET_free (cur); 94 GNUNET_free (cur);
95 } 95 }
96 96
97 GNUNET_free_non_null (e->name); 97 GNUNET_free (e->name);
98 GNUNET_free_non_null (e->cfg_file); 98 GNUNET_free (e->cfg_file);
99 GNUNET_free (e); 99 GNUNET_free (e);
100} 100}
101 101
@@ -344,7 +344,7 @@ load_episode (struct Experiment *e,
344 GNUNET_free (op_name); 344 GNUNET_free (op_name);
345 GNUNET_free (op); 345 GNUNET_free (op);
346 GNUNET_free (sec_name); 346 GNUNET_free (sec_name);
347 GNUNET_free_non_null (pref); 347 GNUNET_free (pref);
348 GNUNET_free (o); 348 GNUNET_free (o);
349 return GNUNET_SYSERR; 349 return GNUNET_SYSERR;
350 } 350 }
@@ -364,7 +364,7 @@ load_episode (struct Experiment *e,
364 GNUNET_free (op_name); 364 GNUNET_free (op_name);
365 GNUNET_free (op); 365 GNUNET_free (op);
366 GNUNET_free (sec_name); 366 GNUNET_free (sec_name);
367 GNUNET_free_non_null (pref); 367 GNUNET_free (pref);
368 GNUNET_free (o); 368 GNUNET_free (o);
369 return GNUNET_SYSERR; 369 return GNUNET_SYSERR;
370 } 370 }
@@ -397,7 +397,7 @@ load_episode (struct Experiment *e,
397 fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n", 397 fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n",
398 op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id); 398 op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id);
399 399
400 GNUNET_free_non_null (type); 400 GNUNET_free (type);
401 GNUNET_free (op); 401 GNUNET_free (op);
402 402
403 GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o); 403 GNUNET_CONTAINER_DLL_insert (cur->head, cur->tail, o);
diff --git a/src/ats-tool/gnunet-ats.c b/src/ats-tool/gnunet-ats.c
index 947ed7798..169daa6f1 100644
--- a/src/ats-tool/gnunet-ats.c
+++ b/src/ats-tool/gnunet-ats.c
@@ -978,8 +978,8 @@ main (int argc, char *const *argv)
978 options, 978 options,
979 &run, 979 &run,
980 NULL); 980 NULL);
981 GNUNET_free_non_null (opt_pid_str); 981 GNUNET_free (opt_pid_str);
982 GNUNET_free_non_null (opt_type_str); 982 GNUNET_free (opt_type_str);
983 GNUNET_free_nz ((void *) argv); 983 GNUNET_free_nz ((void *) argv);
984 984
985 if (GNUNET_OK == res) 985 if (GNUNET_OK == res)
diff --git a/src/ats/gnunet-ats-solver-eval.c b/src/ats/gnunet-ats-solver-eval.c
index 6a014357e..25b963532 100644
--- a/src/ats/gnunet-ats-solver-eval.c
+++ b/src/ats/gnunet-ats-solver-eval.c
@@ -1307,17 +1307,17 @@ free_experiment (struct Experiment *e)
1307 for (cur_o = next_o; NULL != cur_o; cur_o = next_o) 1307 for (cur_o = next_o; NULL != cur_o; cur_o = next_o)
1308 { 1308 {
1309 next_o = cur_o->next; 1309 next_o = cur_o->next;
1310 GNUNET_free_non_null (cur_o->address); 1310 GNUNET_free (cur_o->address);
1311 GNUNET_free_non_null (cur_o->plugin); 1311 GNUNET_free (cur_o->plugin);
1312 GNUNET_free (cur_o); 1312 GNUNET_free (cur_o);
1313 } 1313 }
1314 GNUNET_free (cur); 1314 GNUNET_free (cur);
1315 } 1315 }
1316 1316
1317 GNUNET_free_non_null (e->name); 1317 GNUNET_free (e->name);
1318 GNUNET_free_non_null (e->log_prefix); 1318 GNUNET_free (e->log_prefix);
1319 GNUNET_free_non_null (e->log_output_dir); 1319 GNUNET_free (e->log_output_dir);
1320 GNUNET_free_non_null (e->cfg_file); 1320 GNUNET_free (e->cfg_file);
1321 GNUNET_free (e); 1321 GNUNET_free (e);
1322} 1322}
1323 1323
@@ -1967,7 +1967,7 @@ load_op_start_set_property (struct GNUNET_ATS_TEST_Operation *o,
1967 fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n", 1967 fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n",
1968 op_counter, op_name, e->id); 1968 op_counter, op_name, e->id);
1969 GNUNET_free (op_name); 1969 GNUNET_free (op_name);
1970 GNUNET_free_non_null (prop); 1970 GNUNET_free (prop);
1971 return GNUNET_SYSERR; 1971 return GNUNET_SYSERR;
1972 } 1972 }
1973 1973
@@ -2038,7 +2038,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
2038 fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n", 2038 fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n",
2039 op_counter, "STOP_SET_PROPERTY", op_name); 2039 op_counter, "STOP_SET_PROPERTY", op_name);
2040 GNUNET_free (op_name); 2040 GNUNET_free (op_name);
2041 GNUNET_free_non_null (pref); 2041 GNUNET_free (pref);
2042 return GNUNET_SYSERR; 2042 return GNUNET_SYSERR;
2043 } 2043 }
2044 2044
@@ -2047,7 +2047,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
2047 fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n", 2047 fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n",
2048 op_counter, op_name, e->id); 2048 op_counter, op_name, e->id);
2049 GNUNET_free (op_name); 2049 GNUNET_free (op_name);
2050 GNUNET_free_non_null (pref); 2050 GNUNET_free (pref);
2051 return GNUNET_SYSERR; 2051 return GNUNET_SYSERR;
2052 } 2052 }
2053 2053
@@ -2419,7 +2419,7 @@ enforce_del_address (struct GNUNET_ATS_TEST_Operation *op)
2419 } 2419 }
2420 GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a); 2420 GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a);
2421 2421
2422 GNUNET_free_non_null (a->ats_addr->atsi); 2422 GNUNET_free (a->ats_addr->atsi);
2423 GNUNET_free (a->ats_addr); 2423 GNUNET_free (a->ats_addr);
2424 GNUNET_free (a); 2424 GNUNET_free (a);
2425} 2425}
diff --git a/src/ats/perf_ats_solver.c b/src/ats/perf_ats_solver.c
index 8e20f4454..2fbadef4d 100644
--- a/src/ats/perf_ats_solver.c
+++ b/src/ats/perf_ats_solver.c
@@ -325,8 +325,8 @@ end_now (int res)
325 ph.stat = NULL; 325 ph.stat = NULL;
326 } 326 }
327 327
328 GNUNET_free_non_null (ph.peers); 328 GNUNET_free (ph.peers);
329 GNUNET_free_non_null (ph.iterations_results); 329 GNUNET_free (ph.iterations_results);
330 330
331 GAS_normalization_stop (); 331 GAS_normalization_stop ();
332 GAS_preference_done (); 332 GAS_preference_done ();
@@ -1090,13 +1090,13 @@ write_all_iterations (void)
1090 if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full))) 1090 if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full)))
1091 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", 1091 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n",
1092 data_fn_full); 1092 data_fn_full);
1093 GNUNET_free_non_null (data_fn_full); 1093 GNUNET_free (data_fn_full);
1094 1094
1095 if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close ( 1095 if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close (
1096 f_update))) 1096 f_update)))
1097 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n", 1097 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n",
1098 data_fn_update); 1098 data_fn_update);
1099 GNUNET_free_non_null (data_fn_update); 1099 GNUNET_free (data_fn_update);
1100} 1100}
1101 1101
1102 1102
@@ -1115,7 +1115,7 @@ do_delete_address (void *cls,
1115 pid, 1115 pid,
1116 cur)); 1116 cur));
1117 ph.sf->s_del (ph.sf->cls, cur); 1117 ph.sf->s_del (ph.sf->cls, cur);
1118 GNUNET_free_non_null (cur->atsi); 1118 GNUNET_free (cur->atsi);
1119 GNUNET_free (cur); 1119 GNUNET_free (cur);
1120 return GNUNET_OK; 1120 return GNUNET_OK;
1121} 1121}
@@ -1427,7 +1427,7 @@ run (void *cls, char *const *args, const char *cfgfile,
1427 if (0 == c2) 1427 if (0 == c2)
1428 continue; 1428 continue;
1429 if (ph.measure_updates) 1429 if (ph.measure_updates)
1430 GNUNET_free_non_null ( 1430 GNUNET_free (
1431 ph.iterations_results[c].update_results_array[c2]); 1431 ph.iterations_results[c].update_results_array[c2]);
1432 GNUNET_free (ph.iterations_results[c].results_array[c2]); 1432 GNUNET_free (ph.iterations_results[c].results_array[c2]);
1433 } 1433 }
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c
index f4324d238..f554291b6 100644
--- a/src/ats/plugin_ats_proportional.c
+++ b/src/ats/plugin_ats_proportional.c
@@ -1225,7 +1225,7 @@ libgnunet_plugin_ats_proportional_done (void *cls)
1225 GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head, 1225 GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head,
1226 s->network_entries[c].tail, 1226 s->network_entries[c].tail,
1227 cur); 1227 cur);
1228 GNUNET_free_non_null (cur->addr->solver_information); 1228 GNUNET_free (cur->addr->solver_information);
1229 GNUNET_free (cur); 1229 GNUNET_free (cur);
1230 } 1230 }
1231 GNUNET_free (s->network_entries[c].stat_total); 1231 GNUNET_free (s->network_entries[c].stat_total);
diff --git a/src/ats/test_ats_lib.c b/src/ats/test_ats_lib.c
index 2c4d3f5ad..d19da0106 100644
--- a/src/ats/test_ats_lib.c
+++ b/src/ats/test_ats_lib.c
@@ -165,7 +165,7 @@ free_asd (void *cls,
165 GNUNET_CONTAINER_multipeermap_remove (p2asd, 165 GNUNET_CONTAINER_multipeermap_remove (p2asd,
166 key, 166 key,
167 asd)); 167 asd));
168 GNUNET_free_non_null (asd->address); 168 GNUNET_free (asd->address);
169 GNUNET_free (asd); 169 GNUNET_free (asd);
170 return GNUNET_OK; 170 return GNUNET_OK;
171} 171}
@@ -951,7 +951,7 @@ address_suggest_cb (void *cls,
951 asd->bandwidth_out = bandwidth_out; 951 asd->bandwidth_out = bandwidth_out;
952 asd->bandwidth_in = bandwidth_in; 952 asd->bandwidth_in = bandwidth_in;
953 asd->session = session; 953 asd->session = session;
954 GNUNET_free_non_null (asd->address); 954 GNUNET_free (asd->address);
955 asd->address = NULL; 955 asd->address = NULL;
956 if (NULL != address) 956 if (NULL != address)
957 asd->address = GNUNET_HELLO_address_copy (address); 957 asd->address = GNUNET_HELLO_address_copy (address);
diff --git a/src/cadet/cadet_api.c b/src/cadet/cadet_api.c
index 45cb66c1d..67f6571c5 100644
--- a/src/cadet/cadet_api.c
+++ b/src/cadet/cadet_api.c
@@ -819,7 +819,7 @@ GNUNET_CADET_close_port (struct GNUNET_CADET_Port *p)
819 msg->port = p->id; 819 msg->port = p->id;
820 GNUNET_MQ_send (p->cadet->mq, env); 820 GNUNET_MQ_send (p->cadet->mq, env);
821 } 821 }
822 GNUNET_free_non_null (p->handlers); 822 GNUNET_free (p->handlers);
823 GNUNET_free (p); 823 GNUNET_free (p);
824} 824}
825 825
diff --git a/src/cadet/gnunet-service-cadet.c b/src/cadet/gnunet-service-cadet.c
index 03af3d5c0..f3767fb01 100644
--- a/src/cadet/gnunet-service-cadet.c
+++ b/src/cadet/gnunet-service-cadet.c
@@ -415,7 +415,7 @@ shutdown_rest ()
415 } 415 }
416 GCD_shutdown (); 416 GCD_shutdown ();
417 GCH_shutdown (); 417 GCH_shutdown ();
418 GNUNET_free_non_null (my_private_key); 418 GNUNET_free (my_private_key);
419 my_private_key = NULL; 419 my_private_key = NULL;
420} 420}
421 421
diff --git a/src/cadet/gnunet-service-cadet_hello.c b/src/cadet/gnunet-service-cadet_hello.c
index 21870a454..c7857032b 100644
--- a/src/cadet/gnunet-service-cadet_hello.c
+++ b/src/cadet/gnunet-service-cadet_hello.c
@@ -75,7 +75,7 @@ got_hello (void *cls,
75 if (0 == GNUNET_memcmp (id, 75 if (0 == GNUNET_memcmp (id,
76 &my_full_id)) 76 &my_full_id))
77 { 77 {
78 GNUNET_free_non_null (mine); 78 GNUNET_free (mine);
79 mine = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (&hello->header); 79 mine = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (&hello->header);
80 GCD_hello_update (); 80 GCD_hello_update ();
81 return; 81 return;
diff --git a/src/cadet/gnunet-service-cadet_peer.c b/src/cadet/gnunet-service-cadet_peer.c
index 55800b88c..e5885278b 100644
--- a/src/cadet/gnunet-service-cadet_peer.c
+++ b/src/cadet/gnunet-service-cadet_peer.c
@@ -345,8 +345,8 @@ destroy_peer (void *cls)
345 GNUNET_CONTAINER_multipeermap_remove (peers, 345 GNUNET_CONTAINER_multipeermap_remove (peers,
346 &cp->pid, 346 &cp->pid,
347 cp)); 347 cp));
348 GNUNET_free_non_null (cp->path_heads); 348 GNUNET_free (cp->path_heads);
349 GNUNET_free_non_null (cp->path_tails); 349 GNUNET_free (cp->path_tails);
350 cp->path_dll_length = 0; 350 cp->path_dll_length = 0;
351 if (NULL != cp->search_h) 351 if (NULL != cp->search_h)
352 { 352 {
@@ -376,7 +376,7 @@ destroy_peer (void *cls)
376 GNUNET_SCHEDULER_cancel (cp->heap_cleanup_task); 376 GNUNET_SCHEDULER_cancel (cp->heap_cleanup_task);
377 cp->heap_cleanup_task = NULL; 377 cp->heap_cleanup_task = NULL;
378 } 378 }
379 GNUNET_free_non_null (cp->hello); 379 GNUNET_free (cp->hello);
380 /* Peer should not be freed if paths exist; if there are no paths, 380 /* Peer should not be freed if paths exist; if there are no paths,
381 there ought to be no connections, and without connections, no 381 there ought to be no connections, and without connections, no
382 notifications. Thus we can assert that mqm_head is empty at this 382 notifications. Thus we can assert that mqm_head is empty at this
diff --git a/src/consensus/gnunet-service-consensus.c b/src/consensus/gnunet-service-consensus.c
index 160d352d7..13fa0d0e7 100644
--- a/src/consensus/gnunet-service-consensus.c
+++ b/src/consensus/gnunet-service-consensus.c
@@ -1347,7 +1347,7 @@ not_evil:
1347 evil->type = EVILNESS_NONE; 1347 evil->type = EVILNESS_NONE;
1348cleanup: 1348cleanup:
1349 GNUNET_free (evil_spec); 1349 GNUNET_free (evil_spec);
1350 /* no GNUNET_free_non_null since it wasn't 1350 /* no GNUNET_free since it wasn't
1351 * allocated with GNUNET_malloc */ 1351 * allocated with GNUNET_malloc */
1352 if (NULL != evil_type_str) 1352 if (NULL != evil_type_str)
1353 free (evil_type_str); 1353 free (evil_type_str);
diff --git a/src/conversation/gnunet-conversation.c b/src/conversation/gnunet-conversation.c
index b908cd82c..7a2a727a5 100644
--- a/src/conversation/gnunet-conversation.c
+++ b/src/conversation/gnunet-conversation.c
@@ -359,7 +359,7 @@ start_phone ()
359 else 359 else
360 { 360 {
361 GNUNET_CONVERSATION_phone_get_record (phone, &rd); 361 GNUNET_CONVERSATION_phone_get_record (phone, &rd);
362 GNUNET_free_non_null (address); 362 GNUNET_free (address);
363 address = 363 address =
364 GNUNET_GNSRECORD_value_to_string (rd.record_type, rd.data, rd.data_size); 364 GNUNET_GNSRECORD_value_to_string (rd.record_type, rd.data, rd.data_size);
365 fprintf ( 365 fprintf (
@@ -1035,7 +1035,7 @@ do_stop_task (void *cls)
1035 mic = NULL; 1035 mic = NULL;
1036 GNUNET_free (ego_name); 1036 GNUNET_free (ego_name);
1037 ego_name = NULL; 1037 ego_name = NULL;
1038 GNUNET_free_non_null (peer_name); 1038 GNUNET_free (peer_name);
1039 peer_name = NULL; 1039 peer_name = NULL;
1040 phone_state = PS_ERROR; 1040 phone_state = PS_ERROR;
1041} 1041}
diff --git a/src/core/core_api.c b/src/core/core_api.c
index d24378654..81118693d 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -745,7 +745,7 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle)
745 GNUNET_MQ_destroy (handle->mq); 745 GNUNET_MQ_destroy (handle->mq);
746 handle->mq = NULL; 746 handle->mq = NULL;
747 } 747 }
748 GNUNET_free_non_null (handle->handlers); 748 GNUNET_free (handle->handlers);
749 GNUNET_free (handle); 749 GNUNET_free (handle);
750} 750}
751 751
diff --git a/src/core/test_core_api_reliability.c b/src/core/test_core_api_reliability.c
index b510e8993..136539ed3 100644
--- a/src/core/test_core_api_reliability.c
+++ b/src/core/test_core_api_reliability.c
@@ -384,7 +384,7 @@ process_hello (void *cls,
384 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 384 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
385 "Received (my) `%s' from transport service\n", "HELLO"); 385 "Received (my) `%s' from transport service\n", "HELLO");
386 GNUNET_assert (message != NULL); 386 GNUNET_assert (message != NULL);
387 GNUNET_free_non_null (p->hello); 387 GNUNET_free (p->hello);
388 p->hello = GNUNET_copy_message (message); 388 p->hello = GNUNET_copy_message (message);
389 if ((p == &p1) && (NULL == p2.oh)) 389 if ((p == &p1) && (NULL == p2.oh))
390 p2.oh = GNUNET_TRANSPORT_offer_hello (p2.cfg, 390 p2.oh = GNUNET_TRANSPORT_offer_hello (p2.cfg,
@@ -523,8 +523,8 @@ main (int argc,
523 &ok); 523 &ok);
524 stop_arm (&p1); 524 stop_arm (&p1);
525 stop_arm (&p2); 525 stop_arm (&p2);
526 GNUNET_free_non_null (p1.hello); 526 GNUNET_free (p1.hello);
527 GNUNET_free_non_null (p2.hello); 527 GNUNET_free (p2.hello);
528 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1"); 528 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
529 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2"); 529 GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
530 530
diff --git a/src/curl/curl.c b/src/curl/curl.c
index b7452330f..a63a10f3b 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -529,7 +529,7 @@ GNUNET_CURL_job_cancel (struct GNUNET_CURL_Job *job)
529 GNUNET_break (CURLM_OK == 529 GNUNET_break (CURLM_OK ==
530 curl_multi_remove_handle (ctx->multi, job->easy_handle)); 530 curl_multi_remove_handle (ctx->multi, job->easy_handle));
531 curl_easy_cleanup (job->easy_handle); 531 curl_easy_cleanup (job->easy_handle);
532 GNUNET_free_non_null (job->db.buf); 532 GNUNET_free (job->db.buf);
533 curl_slist_free_all (job->job_headers); 533 curl_slist_free_all (job->job_headers);
534 ctx->cb (ctx->cb_cls); 534 ctx->cb (ctx->cb_cls);
535 GNUNET_free (job); 535 GNUNET_free (job);
@@ -642,7 +642,7 @@ GNUNET_CURL_download_get_result_ (struct GNUNET_CURL_DownloadBuffer *db,
642 *response_code = 0; 642 *response_code = 0;
643 } 643 }
644 } 644 }
645 GNUNET_free_non_null (db->buf); 645 GNUNET_free (db->buf);
646 db->buf = NULL; 646 db->buf = NULL;
647 db->buf_size = 0; 647 db->buf_size = 0;
648 if (NULL != json) 648 if (NULL != json)
diff --git a/src/datacache/plugin_datacache_heap.c b/src/datacache/plugin_datacache_heap.c
index dbc9cac9c..074437e7d 100644
--- a/src/datacache/plugin_datacache_heap.c
+++ b/src/datacache/plugin_datacache_heap.c
@@ -395,7 +395,7 @@ heap_plugin_del (void *cls)
395 plugin->env->delete_notify (plugin->env->cls, 395 plugin->env->delete_notify (plugin->env->cls,
396 &val->key, 396 &val->key,
397 val->size + OVERHEAD); 397 val->size + OVERHEAD);
398 GNUNET_free_non_null (val->path_info); 398 GNUNET_free (val->path_info);
399 GNUNET_free (val); 399 GNUNET_free (val);
400 return GNUNET_OK; 400 return GNUNET_OK;
401} 401}
@@ -577,7 +577,7 @@ libgnunet_plugin_datacache_heap_done (void *cls)
577 GNUNET_CONTAINER_multihashmap_remove (plugin->map, 577 GNUNET_CONTAINER_multihashmap_remove (plugin->map,
578 &val->key, 578 &val->key,
579 val)); 579 val));
580 GNUNET_free_non_null (val->path_info); 580 GNUNET_free (val->path_info);
581 GNUNET_free (val); 581 GNUNET_free (val);
582 } 582 }
583 GNUNET_CONTAINER_heap_destroy (plugin->heaps[i]); 583 GNUNET_CONTAINER_heap_destroy (plugin->heaps[i]);
diff --git a/src/datacache/plugin_datacache_sqlite.c b/src/datacache/plugin_datacache_sqlite.c
index 55a8a7fae..a7da6b068 100644
--- a/src/datacache/plugin_datacache_sqlite.c
+++ b/src/datacache/plugin_datacache_sqlite.c
@@ -764,7 +764,7 @@ libgnunet_plugin_datacache_sqlite_done (void *cls)
764#if ! WINDOWS || defined(__CYGWIN__) 764#if ! WINDOWS || defined(__CYGWIN__)
765 if ((NULL != plugin->fn) && (0 != unlink (plugin->fn))) 765 if ((NULL != plugin->fn) && (0 != unlink (plugin->fn)))
766 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn); 766 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn);
767 GNUNET_free_non_null (plugin->fn); 767 GNUNET_free (plugin->fn);
768#endif 768#endif
769 sqlite3_finalize (plugin->insert_stmt); 769 sqlite3_finalize (plugin->insert_stmt);
770 sqlite3_finalize (plugin->get_count_stmt); 770 sqlite3_finalize (plugin->get_count_stmt);
diff --git a/src/datastore/gnunet-service-datastore.c b/src/datastore/gnunet-service-datastore.c
index 3fc46e19c..1c9e5e463 100644
--- a/src/datastore/gnunet-service-datastore.c
+++ b/src/datastore/gnunet-service-datastore.c
@@ -1355,7 +1355,7 @@ cleaning_task (void *cls)
1355 GNUNET_SCHEDULER_cancel (stat_timeout_task); 1355 GNUNET_SCHEDULER_cancel (stat_timeout_task);
1356 stat_timeout_task = NULL; 1356 stat_timeout_task = NULL;
1357 } 1357 }
1358 GNUNET_free_non_null (plugin_name); 1358 GNUNET_free (plugin_name);
1359 plugin_name = NULL; 1359 plugin_name = NULL;
1360 if (last_sync > 0) 1360 if (last_sync > 0)
1361 sync_stats (); 1361 sync_stats ();
@@ -1490,7 +1490,7 @@ run (void *cls,
1490 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1490 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
1491 _ ("Could not use specified filename `%s' for bloomfilter.\n"), 1491 _ ("Could not use specified filename `%s' for bloomfilter.\n"),
1492 NULL != fn ? fn : ""); 1492 NULL != fn ? fn : "");
1493 GNUNET_free_non_null (fn); 1493 GNUNET_free (fn);
1494 fn = NULL; 1494 fn = NULL;
1495 } 1495 }
1496 if (NULL != fn) 1496 if (NULL != fn)
@@ -1566,7 +1566,7 @@ run (void *cls,
1566 5); /* approx. 3% false positives at max use */ 1566 5); /* approx. 3% false positives at max use */
1567 refresh_bf = GNUNET_YES; 1567 refresh_bf = GNUNET_YES;
1568 } 1568 }
1569 GNUNET_free_non_null (fn); 1569 GNUNET_free (fn);
1570 if (NULL == filter) 1570 if (NULL == filter)
1571 { 1571 {
1572 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 1572 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/datastore/plugin_datastore_sqlite.c b/src/datastore/plugin_datastore_sqlite.c
index b3b30f256..cecc37978 100644
--- a/src/datastore/plugin_datastore_sqlite.c
+++ b/src/datastore/plugin_datastore_sqlite.c
@@ -550,7 +550,7 @@ database_shutdown (struct Plugin *plugin)
550#endif 550#endif
551 if (SQLITE_OK != result) 551 if (SQLITE_OK != result)
552 LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR, "sqlite3_close"); 552 LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR, "sqlite3_close");
553 GNUNET_free_non_null (plugin->fn); 553 GNUNET_free (plugin->fn);
554} 554}
555 555
556 556
@@ -640,7 +640,7 @@ sqlite_plugin_put (void *cls,
640 GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK, 640 GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
641 "sqlite3_step"); 641 "sqlite3_step");
642 cont (cont_cls, key, size, GNUNET_SYSERR, msg); 642 cont (cont_cls, key, size, GNUNET_SYSERR, msg);
643 GNUNET_free_non_null (msg); 643 GNUNET_free (msg);
644 return; 644 return;
645 } 645 }
646 int changes = sqlite3_changes (plugin->dbh); 646 int changes = sqlite3_changes (plugin->dbh);
@@ -724,12 +724,12 @@ sqlite_plugin_put (void *cls,
724 database_shutdown (plugin); 724 database_shutdown (plugin);
725 database_setup (plugin->env->cfg, plugin); 725 database_setup (plugin->env->cfg, plugin);
726 cont (cont_cls, key, size, GNUNET_SYSERR, msg); 726 cont (cont_cls, key, size, GNUNET_SYSERR, msg);
727 GNUNET_free_non_null (msg); 727 GNUNET_free (msg);
728 return; 728 return;
729 } 729 }
730 GNUNET_SQ_reset (plugin->dbh, stmt); 730 GNUNET_SQ_reset (plugin->dbh, stmt);
731 cont (cont_cls, key, size, ret, msg); 731 cont (cont_cls, key, size, ret, msg);
732 GNUNET_free_non_null (msg); 732 GNUNET_free (msg);
733} 733}
734 734
735 735
diff --git a/src/datastore/test_datastore_api.c b/src/datastore/test_datastore_api.c
index dbe590bab..e72a6acd3 100644
--- a/src/datastore/test_datastore_api.c
+++ b/src/datastore/test_datastore_api.c
@@ -198,7 +198,7 @@ check_success (void *cls,
198 msg); 198 msg);
199 crc->phase = RP_ERROR; 199 crc->phase = RP_ERROR;
200 } 200 }
201 GNUNET_free_non_null (crc->data); 201 GNUNET_free (crc->data);
202 crc->data = NULL; 202 crc->data = NULL;
203 GNUNET_SCHEDULER_add_now (&run_continuation, crc); 203 GNUNET_SCHEDULER_add_now (&run_continuation, crc);
204} 204}
diff --git a/src/datastore/test_datastore_api_management.c b/src/datastore/test_datastore_api_management.c
index 7bec0d064..175765267 100644
--- a/src/datastore/test_datastore_api_management.c
+++ b/src/datastore/test_datastore_api_management.c
@@ -131,7 +131,7 @@ check_success (void *cls, int success, struct GNUNET_TIME_Absolute
131 if (GNUNET_OK != success) 131 if (GNUNET_OK != success)
132 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", msg); 132 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", msg);
133 GNUNET_assert (GNUNET_OK == success); 133 GNUNET_assert (GNUNET_OK == success);
134 GNUNET_free_non_null (crc->data); 134 GNUNET_free (crc->data);
135 crc->data = NULL; 135 crc->data = NULL;
136 GNUNET_SCHEDULER_add_now (&run_continuation, crc); 136 GNUNET_SCHEDULER_add_now (&run_continuation, crc);
137} 137}
diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c
index c6443f102..1eaed8a5c 100644
--- a/src/dht/dht_api.c
+++ b/src/dht/dht_api.c
@@ -1258,7 +1258,7 @@ GNUNET_DHT_monitor_stop (struct GNUNET_DHT_MonitorHandle *mh)
1258 } 1258 }
1259 GNUNET_MQ_send (handle->mq, 1259 GNUNET_MQ_send (handle->mq,
1260 env); 1260 env);
1261 GNUNET_free_non_null (mh->key); 1261 GNUNET_free (mh->key);
1262 GNUNET_free (mh); 1262 GNUNET_free (mh);
1263} 1263}
1264 1264
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c
index 2dd49a1b6..da46dcfee 100644
--- a/src/dht/gnunet-service-dht.c
+++ b/src/dht/gnunet-service-dht.c
@@ -69,7 +69,7 @@ static void
69process_hello (void *cls, 69process_hello (void *cls,
70 const struct GNUNET_MessageHeader *message) 70 const struct GNUNET_MessageHeader *message)
71{ 71{
72 GNUNET_free_non_null (GDS_my_hello); 72 GNUNET_free (GDS_my_hello);
73 GDS_my_hello = GNUNET_malloc (ntohs (message->size)); 73 GDS_my_hello = GNUNET_malloc (ntohs (message->size));
74 GNUNET_memcpy (GDS_my_hello, 74 GNUNET_memcpy (GDS_my_hello,
75 message, 75 message,
@@ -106,7 +106,7 @@ shutdown_task (void *cls)
106 GNUNET_YES); 106 GNUNET_YES);
107 GDS_stats = NULL; 107 GDS_stats = NULL;
108 } 108 }
109 GNUNET_free_non_null (GDS_my_hello); 109 GNUNET_free (GDS_my_hello);
110 GDS_my_hello = NULL; 110 GDS_my_hello = NULL;
111 GDS_CLIENTS_stop (); 111 GDS_CLIENTS_stop ();
112} 112}
diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c
index be6e22d01..1e44c1fad 100644
--- a/src/dht/gnunet-service-dht_clients.c
+++ b/src/dht/gnunet-service-dht_clients.c
@@ -333,7 +333,7 @@ client_disconnect_cb (void *cls,
333 struct ClientMonitorRecord *next; 333 struct ClientMonitorRecord *next;
334 334
335 next = monitor->next; 335 next = monitor->next;
336 GNUNET_free_non_null (monitor->key); 336 GNUNET_free (monitor->key);
337 GNUNET_CONTAINER_DLL_remove (monitor_head, 337 GNUNET_CONTAINER_DLL_remove (monitor_head,
338 monitor_tail, 338 monitor_tail,
339 monitor); 339 monitor);
@@ -938,7 +938,7 @@ handle_dht_local_monitor_stop (void *cls,
938 GNUNET_CONTAINER_DLL_remove (monitor_head, 938 GNUNET_CONTAINER_DLL_remove (monitor_head,
939 monitor_tail, 939 monitor_tail,
940 r); 940 r);
941 GNUNET_free_non_null (r->key); 941 GNUNET_free (r->key);
942 GNUNET_free (r); 942 GNUNET_free (r);
943 return; /* Delete only ONE entry */ 943 return; /* Delete only ONE entry */
944 } 944 }
@@ -1281,7 +1281,7 @@ GDS_CLIENTS_process_get (uint32_t options,
1281 env); 1281 env);
1282 } 1282 }
1283 } 1283 }
1284 GNUNET_free_non_null (cl); 1284 GNUNET_free (cl);
1285} 1285}
1286 1286
1287 1287
@@ -1363,7 +1363,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
1363 env); 1363 env);
1364 } 1364 }
1365 } 1365 }
1366 GNUNET_free_non_null (cl); 1366 GNUNET_free (cl);
1367} 1367}
1368 1368
1369 1369
@@ -1445,7 +1445,7 @@ GDS_CLIENTS_process_put (uint32_t options,
1445 env); 1445 env);
1446 } 1446 }
1447 } 1447 }
1448 GNUNET_free_non_null (cl); 1448 GNUNET_free (cl);
1449} 1449}
1450 1450
1451 1451
diff --git a/src/dht/gnunet-service-dht_hello.c b/src/dht/gnunet-service-dht_hello.c
index a0141d1fb..906391334 100644
--- a/src/dht/gnunet-service-dht_hello.c
+++ b/src/dht/gnunet-service-dht_hello.c
@@ -86,7 +86,7 @@ process_hello (void *cls,
86 gettext_noop ("# HELLOs obtained from peerinfo"), 1, 86 gettext_noop ("# HELLOs obtained from peerinfo"), 1,
87 GNUNET_NO); 87 GNUNET_NO);
88 hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer); 88 hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer);
89 GNUNET_free_non_null (hm); 89 GNUNET_free (hm);
90 hm = GNUNET_malloc (GNUNET_HELLO_size (hello)); 90 hm = GNUNET_malloc (GNUNET_HELLO_size (hello));
91 GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello)); 91 GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello));
92 GNUNET_assert (GNUNET_SYSERR != 92 GNUNET_assert (GNUNET_SYSERR !=
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index fce69d3f6..b211fca6b 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1436,7 +1436,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
1436 if (msize + sizeof(struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE) 1436 if (msize + sizeof(struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE)
1437 { 1437 {
1438 GNUNET_break (0); 1438 GNUNET_break (0);
1439 GNUNET_free_non_null (reply_bf); 1439 GNUNET_free (reply_bf);
1440 GNUNET_free (targets); 1440 GNUNET_free (targets);
1441 return GNUNET_NO; 1441 return GNUNET_NO;
1442 } 1442 }
@@ -1493,7 +1493,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
1493 env); 1493 env);
1494 } 1494 }
1495 GNUNET_free (targets); 1495 GNUNET_free (targets);
1496 GNUNET_free_non_null (reply_bf); 1496 GNUNET_free (reply_bf);
1497 return (skip_count < target_count) ? GNUNET_OK : GNUNET_NO; 1497 return (skip_count < target_count) ? GNUNET_OK : GNUNET_NO;
1498} 1498}
1499 1499
diff --git a/src/dht/gnunet_dht_profiler.c b/src/dht/gnunet_dht_profiler.c
index 5a73880be..ba50c3d1a 100644
--- a/src/dht/gnunet_dht_profiler.c
+++ b/src/dht/gnunet_dht_profiler.c
@@ -323,7 +323,7 @@ do_shutdown (void *cls)
323 GNUNET_TESTBED_operation_done (bandwidth_stats_op); 323 GNUNET_TESTBED_operation_done (bandwidth_stats_op);
324 bandwidth_stats_op = NULL; 324 bandwidth_stats_op = NULL;
325 } 325 }
326 GNUNET_free_non_null (a_ac); 326 GNUNET_free (a_ac);
327} 327}
328 328
329 329
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
diff --git a/src/exit/gnunet-daemon-exit.c b/src/exit/gnunet-daemon-exit.c
index b193176c4..27eba018f 100644
--- a/src/exit/gnunet-daemon-exit.c
+++ b/src/exit/gnunet-daemon-exit.c
@@ -2471,7 +2471,7 @@ free_service_record (void *cls,
2471 key, 2471 key,
2472 service)); 2472 service));
2473 GNUNET_CADET_close_port (service->port); 2473 GNUNET_CADET_close_port (service->port);
2474 GNUNET_free_non_null (service->name); 2474 GNUNET_free (service->name);
2475 GNUNET_free (service); 2475 GNUNET_free (service);
2476 return GNUNET_OK; 2476 return GNUNET_OK;
2477} 2477}
@@ -2613,7 +2613,7 @@ store_service (int proto,
2613 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY)) 2613 GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
2614 { 2614 {
2615 GNUNET_CADET_close_port (service->port); 2615 GNUNET_CADET_close_port (service->port);
2616 GNUNET_free_non_null (service->name); 2616 GNUNET_free (service->name);
2617 GNUNET_free (service); 2617 GNUNET_free (service);
2618 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2618 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
2619 _ ("Got duplicate service records for `%s:%u'\n"), 2619 _ ("Got duplicate service records for `%s:%u'\n"),
@@ -3340,7 +3340,7 @@ cleanup (void *cls)
3340 stats = NULL; 3340 stats = NULL;
3341 } 3341 }
3342 for (i = 0; i < 8; i++) 3342 for (i = 0; i < 8; i++)
3343 GNUNET_free_non_null (exit_argv[i]); 3343 GNUNET_free (exit_argv[i]);
3344} 3344}
3345 3345
3346 3346
@@ -3706,7 +3706,7 @@ advertise_dns_exit ()
3706 "dns", 3706 "dns",
3707 "DNS_RESOLVER", 3707 "DNS_RESOLVER",
3708 _ ("need a valid IPv4 or IPv6 address\n")); 3708 _ ("need a valid IPv4 or IPv6 address\n"));
3709 GNUNET_free_non_null (dns_exit); 3709 GNUNET_free (dns_exit);
3710 return; 3710 return;
3711 } 3711 }
3712 /* open port */ 3712 /* open port */
@@ -3807,7 +3807,7 @@ setup_exit_helper_args ()
3807 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, 3807 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
3808 "EXIT", 3808 "EXIT",
3809 "IPV6ADDR"); 3809 "IPV6ADDR");
3810 GNUNET_free_non_null (ipv6addr); 3810 GNUNET_free (ipv6addr);
3811 return GNUNET_SYSERR; 3811 return GNUNET_SYSERR;
3812 } 3812 }
3813 exit_argv[3] = ipv6addr; 3813 exit_argv[3] = ipv6addr;
@@ -3858,7 +3858,7 @@ setup_exit_helper_args ()
3858 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, 3858 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
3859 "EXIT", 3859 "EXIT",
3860 "IPV4ADDR"); 3860 "IPV4ADDR");
3861 GNUNET_free_non_null (ipv4addr); 3861 GNUNET_free (ipv4addr);
3862 return GNUNET_SYSERR; 3862 return GNUNET_SYSERR;
3863 } 3863 }
3864 exit_argv[5] = ipv4addr; 3864 exit_argv[5] = ipv4addr;
@@ -3875,7 +3875,7 @@ setup_exit_helper_args ()
3875 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, 3875 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
3876 "EXIT", 3876 "EXIT",
3877 "IPV4MASK"); 3877 "IPV4MASK");
3878 GNUNET_free_non_null (ipv4mask); 3878 GNUNET_free (ipv4mask);
3879 return GNUNET_SYSERR; 3879 return GNUNET_SYSERR;
3880 } 3880 }
3881 exit_argv[6] = ipv4mask; 3881 exit_argv[6] = ipv4mask;
@@ -4023,7 +4023,7 @@ run (void *cls,
4023 regex = NULL; 4023 regex = NULL;
4024 else 4024 else
4025 regex = GNUNET_TUN_ipv4policy2regex (policy); 4025 regex = GNUNET_TUN_ipv4policy2regex (policy);
4026 GNUNET_free_non_null (policy); 4026 GNUNET_free (policy);
4027 if (NULL != regex) 4027 if (NULL != regex)
4028 { 4028 {
4029 (void) GNUNET_asprintf (&prefixed_regex, 4029 (void) GNUNET_asprintf (&prefixed_regex,
@@ -4063,7 +4063,7 @@ run (void *cls,
4063 regex = NULL; 4063 regex = NULL;
4064 else 4064 else
4065 regex = GNUNET_TUN_ipv6policy2regex (policy); 4065 regex = GNUNET_TUN_ipv6policy2regex (policy);
4066 GNUNET_free_non_null (policy); 4066 GNUNET_free (policy);
4067 if (NULL != regex) 4067 if (NULL != regex)
4068 { 4068 {
4069 (void) GNUNET_asprintf (&prefixed_regex, 4069 (void) GNUNET_asprintf (&prefixed_regex,
diff --git a/src/fs/fs_api.c b/src/fs/fs_api.c
index 3d2ba3e99..920786146 100644
--- a/src/fs/fs_api.c
+++ b/src/fs/fs_api.c
@@ -570,7 +570,7 @@ GNUNET_FS_data_reader_copy_ (void *cls,
570 return 0; 570 return 0;
571 if (0 == max) 571 if (0 == max)
572 { 572 {
573 GNUNET_free_non_null (data); 573 GNUNET_free (data);
574 return 0; 574 return 0;
575 } 575 }
576 GNUNET_memcpy (buf, &data[offset], max); 576 GNUNET_memcpy (buf, &data[offset], max);
@@ -1132,15 +1132,15 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h,
1132 GNUNET_free (filename); 1132 GNUNET_free (filename);
1133 filename = NULL; 1133 filename = NULL;
1134 } 1134 }
1135 GNUNET_free_non_null (ksks); 1135 GNUNET_free (ksks);
1136 GNUNET_free_non_null (skss); 1136 GNUNET_free (skss);
1137 GNUNET_free_non_null (chks); 1137 GNUNET_free (chks);
1138 return ret; 1138 return ret;
1139cleanup: 1139cleanup:
1140 GNUNET_free_non_null (ksks); 1140 GNUNET_free (ksks);
1141 GNUNET_free_non_null (chks); 1141 GNUNET_free (chks);
1142 GNUNET_free_non_null (skss); 1142 GNUNET_free (skss);
1143 GNUNET_free_non_null (filename); 1143 GNUNET_free (filename);
1144 GNUNET_FS_file_information_destroy (ret, NULL, NULL); 1144 GNUNET_FS_file_information_destroy (ret, NULL, NULL);
1145 return NULL; 1145 return NULL;
1146} 1146}
@@ -1417,11 +1417,11 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
1417 GNUNET_break (0); 1417 GNUNET_break (0);
1418 goto cleanup; 1418 goto cleanup;
1419 } 1419 }
1420 GNUNET_free_non_null (chks); 1420 GNUNET_free (chks);
1421 chks = NULL; 1421 chks = NULL;
1422 GNUNET_free_non_null (ksks); 1422 GNUNET_free (ksks);
1423 ksks = NULL; 1423 ksks = NULL;
1424 GNUNET_free_non_null (skss); 1424 GNUNET_free (skss);
1425 skss = NULL; 1425 skss = NULL;
1426 1426
1427 switch (b) 1427 switch (b)
@@ -1527,9 +1527,9 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
1527cleanup: 1527cleanup:
1528 if (NULL != wh) 1528 if (NULL != wh)
1529 (void) GNUNET_BIO_write_close (wh, NULL); 1529 (void) GNUNET_BIO_write_close (wh, NULL);
1530 GNUNET_free_non_null (chks); 1530 GNUNET_free (chks);
1531 GNUNET_free_non_null (ksks); 1531 GNUNET_free (ksks);
1532 GNUNET_free_non_null (skss); 1532 GNUNET_free (skss);
1533 fn = get_serialization_file_name (fi->h, 1533 fn = get_serialization_file_name (fi->h,
1534 GNUNET_FS_SYNC_PATH_FILE_INFO, 1534 GNUNET_FS_SYNC_PATH_FILE_INFO,
1535 fi->serialization); 1535 fi->serialization);
@@ -1729,10 +1729,10 @@ deserialize_publish_file (void *cls, const char *filename)
1729 pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc); 1729 pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc);
1730 return GNUNET_OK; 1730 return GNUNET_OK;
1731cleanup: 1731cleanup:
1732 GNUNET_free_non_null (pc->nid); 1732 GNUNET_free (pc->nid);
1733 GNUNET_free_non_null (pc->nuid); 1733 GNUNET_free (pc->nuid);
1734 GNUNET_free_non_null (fi_root); 1734 GNUNET_free (fi_root);
1735 GNUNET_free_non_null (fi_pos); 1735 GNUNET_free (fi_pos);
1736 if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) 1736 if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)))
1737 { 1737 {
1738 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1738 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -2131,7 +2131,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc)
2131 goto cleanup; 2131 goto cleanup;
2132 } 2132 }
2133 } 2133 }
2134 GNUNET_free_non_null (uris); 2134 GNUNET_free (uris);
2135 uris = NULL; 2135 uris = NULL;
2136 if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL)) 2136 if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL))
2137 { 2137 {
@@ -2144,7 +2144,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc)
2144cleanup: 2144cleanup:
2145 if (NULL != wh) 2145 if (NULL != wh)
2146 (void) GNUNET_BIO_write_close (wh, NULL); 2146 (void) GNUNET_BIO_write_close (wh, NULL);
2147 GNUNET_free_non_null (uris); 2147 GNUNET_free (uris);
2148 if (0 != unlink (fn)) 2148 if (0 != unlink (fn))
2149 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn); 2149 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn);
2150 GNUNET_free (fn); 2150 GNUNET_free (fn);
@@ -2235,10 +2235,10 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr)
2235 GNUNET_break (0); 2235 GNUNET_break (0);
2236 goto cleanup; 2236 goto cleanup;
2237 } 2237 }
2238 GNUNET_free_non_null (uris); 2238 GNUNET_free (uris);
2239 return; 2239 return;
2240cleanup: 2240cleanup:
2241 GNUNET_free_non_null (uris); 2241 GNUNET_free (uris);
2242 if (NULL != wh) 2242 if (NULL != wh)
2243 (void) GNUNET_BIO_write_close (wh, NULL); 2243 (void) GNUNET_BIO_write_close (wh, NULL);
2244 remove_sync_file_in_dir (sr->h, 2244 remove_sync_file_in_dir (sr->h,
@@ -2309,7 +2309,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc)
2309cleanup: 2309cleanup:
2310 if (NULL != wh) 2310 if (NULL != wh)
2311 (void) GNUNET_BIO_write_close (wh, NULL); 2311 (void) GNUNET_BIO_write_close (wh, NULL);
2312 GNUNET_free_non_null (uris); 2312 GNUNET_free (uris);
2313 GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization); 2313 GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization);
2314 GNUNET_free (sc->serialization); 2314 GNUNET_free (sc->serialization);
2315 sc->serialization = NULL; 2315 sc->serialization = NULL;
@@ -2359,7 +2359,7 @@ deserialize_unindex_file (void *cls, const char *filename)
2359 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset", 2359 (GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset",
2360 (int32_t *) &uc->ksk_offset))) 2360 (int32_t *) &uc->ksk_offset)))
2361 { 2361 {
2362 GNUNET_free_non_null (uris); 2362 GNUNET_free (uris);
2363 GNUNET_break (0); 2363 GNUNET_break (0);
2364 goto cleanup; 2364 goto cleanup;
2365 } 2365 }
@@ -2370,7 +2370,7 @@ deserialize_unindex_file (void *cls, const char *filename)
2370 if (NULL == uc->ksk_uri) 2370 if (NULL == uc->ksk_uri)
2371 { 2371 {
2372 GNUNET_break (0); 2372 GNUNET_break (0);
2373 GNUNET_free_non_null (emsg); 2373 GNUNET_free (emsg);
2374 goto cleanup; 2374 goto cleanup;
2375 } 2375 }
2376 } 2376 }
@@ -2472,7 +2472,7 @@ deserialize_unindex_file (void *cls, const char *filename)
2472 } 2472 }
2473 return GNUNET_OK; 2473 return GNUNET_OK;
2474cleanup: 2474cleanup:
2475 GNUNET_free_non_null (uc->filename); 2475 GNUNET_free (uc->filename);
2476 if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg))) 2476 if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)))
2477 { 2477 {
2478 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2478 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -2485,7 +2485,7 @@ cleanup:
2485 GNUNET_FS_remove_sync_file_ (h, 2485 GNUNET_FS_remove_sync_file_ (h,
2486 GNUNET_FS_SYNC_PATH_MASTER_UNINDEX, 2486 GNUNET_FS_SYNC_PATH_MASTER_UNINDEX,
2487 uc->serialization); 2487 uc->serialization);
2488 GNUNET_free_non_null (uc->serialization); 2488 GNUNET_free (uc->serialization);
2489 GNUNET_free (uc); 2489 GNUNET_free (uc);
2490 return GNUNET_OK; 2490 return GNUNET_OK;
2491} 2491}
@@ -2665,10 +2665,10 @@ deserialize_search_result (void *cls, const char *filename)
2665 } 2665 }
2666 return GNUNET_OK; 2666 return GNUNET_OK;
2667cleanup: 2667cleanup:
2668 GNUNET_free_non_null (download); 2668 GNUNET_free (download);
2669 GNUNET_free_non_null (emsg); 2669 GNUNET_free (emsg);
2670 GNUNET_free_non_null (uris); 2670 GNUNET_free (uris);
2671 GNUNET_free_non_null (update_srch); 2671 GNUNET_free (update_srch);
2672 if (NULL != sr->uri) 2672 if (NULL != sr->uri)
2673 GNUNET_FS_uri_destroy (sr->uri); 2673 GNUNET_FS_uri_destroy (sr->uri);
2674 if (NULL != sr->meta) 2674 if (NULL != sr->meta)
@@ -2823,8 +2823,8 @@ free_search_context (struct GNUNET_FS_SearchContext *sc)
2823 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH, 2823 : GNUNET_FS_SYNC_PATH_CHILD_SEARCH,
2824 sc->serialization); 2824 sc->serialization);
2825 } 2825 }
2826 GNUNET_free_non_null (sc->serialization); 2826 GNUNET_free (sc->serialization);
2827 GNUNET_free_non_null (sc->emsg); 2827 GNUNET_free (sc->emsg);
2828 if (NULL != sc->uri) 2828 if (NULL != sc->uri)
2829 GNUNET_FS_uri_destroy (sc->uri); 2829 GNUNET_FS_uri_destroy (sc->uri);
2830 if (NULL != sc->master_result_map) 2830 if (NULL != sc->master_result_map)
@@ -2896,10 +2896,10 @@ free_download_context (struct GNUNET_FS_DownloadContext *dc)
2896 GNUNET_CONTAINER_meta_data_destroy (dc->meta); 2896 GNUNET_CONTAINER_meta_data_destroy (dc->meta);
2897 if (NULL != dc->uri) 2897 if (NULL != dc->uri)
2898 GNUNET_FS_uri_destroy (dc->uri); 2898 GNUNET_FS_uri_destroy (dc->uri);
2899 GNUNET_free_non_null (dc->temp_filename); 2899 GNUNET_free (dc->temp_filename);
2900 GNUNET_free_non_null (dc->emsg); 2900 GNUNET_free (dc->emsg);
2901 GNUNET_free_non_null (dc->filename); 2901 GNUNET_free (dc->filename);
2902 GNUNET_free_non_null (dc->serialization); 2902 GNUNET_free (dc->serialization);
2903 while (NULL != (dcc = dc->child_head)) 2903 while (NULL != (dcc = dc->child_head))
2904 { 2904 {
2905 GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc); 2905 GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc);
@@ -3020,8 +3020,8 @@ deserialize_download (struct GNUNET_FS_Handle *h,
3020 dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc); 3020 dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc);
3021 return; 3021 return;
3022cleanup: 3022cleanup:
3023 GNUNET_free_non_null (uris); 3023 GNUNET_free (uris);
3024 GNUNET_free_non_null (emsg); 3024 GNUNET_free (emsg);
3025 free_download_context (dc); 3025 free_download_context (dc);
3026} 3026}
3027 3027
@@ -3127,9 +3127,9 @@ deserialize_search (struct GNUNET_FS_Handle *h,
3127 GNUNET_free (uris); 3127 GNUNET_free (uris);
3128 return sc; 3128 return sc;
3129cleanup: 3129cleanup:
3130 GNUNET_free_non_null (emsg); 3130 GNUNET_free (emsg);
3131 free_search_context (sc); 3131 free_search_context (sc);
3132 GNUNET_free_non_null (uris); 3132 GNUNET_free (uris);
3133 return NULL; 3133 return NULL;
3134} 3134}
3135 3135
diff --git a/src/fs/fs_directory.c b/src/fs/fs_directory.c
index 1ef5fa3bb..9a198d8d7 100644
--- a/src/fs/fs_directory.c
+++ b/src/fs/fs_directory.c
@@ -309,8 +309,8 @@ GNUNET_FS_directory_list_contents (size_t size,
309 full_data.size, 309 full_data.size,
310 full_data.data); 310 full_data.data);
311 } 311 }
312 GNUNET_free_non_null (full_data.data); 312 GNUNET_free (full_data.data);
313 GNUNET_free_non_null (filename); 313 GNUNET_free (filename);
314 GNUNET_CONTAINER_meta_data_destroy (md); 314 GNUNET_CONTAINER_meta_data_destroy (md);
315 GNUNET_FS_uri_destroy (uri); 315 GNUNET_FS_uri_destroy (uri);
316 } 316 }
@@ -630,9 +630,9 @@ GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
630 "malloc"); 630 "malloc");
631 *rsize = 0; 631 *rsize = 0;
632 *rdata = NULL; 632 *rdata = NULL;
633 GNUNET_free_non_null (sizes); 633 GNUNET_free (sizes);
634 GNUNET_free_non_null (perm); 634 GNUNET_free (perm);
635 GNUNET_free_non_null (bes); 635 GNUNET_free (bes);
636 return GNUNET_SYSERR; 636 return GNUNET_SYSERR;
637 } 637 }
638 *rdata = data; 638 *rdata = data;
@@ -662,9 +662,9 @@ GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
662 GNUNET_memcpy (&data[off - sizes[i]], &(bes[i])[1], sizes[i]); 662 GNUNET_memcpy (&data[off - sizes[i]], &(bes[i])[1], sizes[i]);
663 GNUNET_free (bes[i]); 663 GNUNET_free (bes[i]);
664 } 664 }
665 GNUNET_free_non_null (sizes); 665 GNUNET_free (sizes);
666 GNUNET_free_non_null (perm); 666 GNUNET_free (perm);
667 GNUNET_free_non_null (bes); 667 GNUNET_free (bes);
668 GNUNET_assert (off == size); 668 GNUNET_assert (off == size);
669 GNUNET_CONTAINER_meta_data_destroy (bld->meta); 669 GNUNET_CONTAINER_meta_data_destroy (bld->meta);
670 GNUNET_free (bld); 670 GNUNET_free (bld);
diff --git a/src/fs/fs_dirmetascan.c b/src/fs/fs_dirmetascan.c
index 11efa053b..cb50182f9 100644
--- a/src/fs/fs_dirmetascan.c
+++ b/src/fs/fs_dirmetascan.c
@@ -106,7 +106,7 @@ GNUNET_FS_directory_scan_abort (struct GNUNET_FS_DirScanner *ds)
106 GNUNET_FS_share_tree_free (ds->toplevel); 106 GNUNET_FS_share_tree_free (ds->toplevel);
107 if (NULL != ds->stop_task) 107 if (NULL != ds->stop_task)
108 GNUNET_SCHEDULER_cancel (ds->stop_task); 108 GNUNET_SCHEDULER_cancel (ds->stop_task);
109 GNUNET_free_non_null (ds->ex_arg); 109 GNUNET_free (ds->ex_arg);
110 GNUNET_free (ds->filename_expanded); 110 GNUNET_free (ds->filename_expanded);
111 GNUNET_free (ds); 111 GNUNET_free (ds);
112} 112}
diff --git a/src/fs/fs_download.c b/src/fs/fs_download.c
index 4d03b6546..6154e8be0 100644
--- a/src/fs/fs_download.c
+++ b/src/fs/fs_download.c
@@ -960,7 +960,7 @@ trigger_recursive_download (void *cls,
960 "Failed to create directory for recursive download of `%s'\n"), 960 "Failed to create directory for recursive download of `%s'\n"),
961 full_name); 961 full_name);
962 GNUNET_free (full_name); 962 GNUNET_free (full_name);
963 GNUNET_free_non_null (fn); 963 GNUNET_free (fn);
964 return; 964 return;
965 } 965 }
966 966
@@ -981,9 +981,9 @@ trigger_recursive_download (void *cls,
981 dc->options, 981 dc->options,
982 NULL, 982 NULL,
983 dc); 983 dc);
984 GNUNET_free_non_null (full_name); 984 GNUNET_free (full_name);
985 GNUNET_free_non_null (temp_name); 985 GNUNET_free (temp_name);
986 GNUNET_free_non_null (fn); 986 GNUNET_free (fn);
987} 987}
988 988
989 989
@@ -999,7 +999,7 @@ GNUNET_FS_free_download_request_ (struct DownloadRequest *dr)
999 return; 999 return;
1000 for (unsigned int i = 0; i < dr->num_children; i++) 1000 for (unsigned int i = 0; i < dr->num_children; i++)
1001 GNUNET_FS_free_download_request_ (dr->children[i]); 1001 GNUNET_FS_free_download_request_ (dr->children[i]);
1002 GNUNET_free_non_null (dr->children); 1002 GNUNET_free (dr->children);
1003 GNUNET_free (dr); 1003 GNUNET_free (dr);
1004} 1004}
1005 1005
@@ -2011,11 +2011,11 @@ GNUNET_FS_download_signal_suspend_ (void *cls)
2011 GNUNET_CONTAINER_multihashmap_destroy (dc->active); 2011 GNUNET_CONTAINER_multihashmap_destroy (dc->active);
2012 dc->active = NULL; 2012 dc->active = NULL;
2013 } 2013 }
2014 GNUNET_free_non_null (dc->filename); 2014 GNUNET_free (dc->filename);
2015 GNUNET_CONTAINER_meta_data_destroy (dc->meta); 2015 GNUNET_CONTAINER_meta_data_destroy (dc->meta);
2016 GNUNET_FS_uri_destroy (dc->uri); 2016 GNUNET_FS_uri_destroy (dc->uri);
2017 GNUNET_free_non_null (dc->temp_filename); 2017 GNUNET_free (dc->temp_filename);
2018 GNUNET_free_non_null (dc->serialization); 2018 GNUNET_free (dc->serialization);
2019 GNUNET_assert (NULL == dc->job_queue); 2019 GNUNET_assert (NULL == dc->job_queue);
2020 GNUNET_free (dc); 2020 GNUNET_free (dc);
2021} 2021}
@@ -2409,7 +2409,7 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete)
2409 dc->temp_filename); 2409 dc->temp_filename);
2410 GNUNET_free (dc->temp_filename); 2410 GNUNET_free (dc->temp_filename);
2411 } 2411 }
2412 GNUNET_free_non_null (dc->serialization); 2412 GNUNET_free (dc->serialization);
2413 GNUNET_assert (NULL == dc->job_queue); 2413 GNUNET_assert (NULL == dc->job_queue);
2414 GNUNET_free (dc); 2414 GNUNET_free (dc);
2415} 2415}
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c
index 28bbf12dd..3324abd58 100644
--- a/src/fs/fs_file_information.c
+++ b/src/fs/fs_file_information.c
@@ -75,7 +75,7 @@ void
75GNUNET_FS_file_information_set_filename (struct GNUNET_FS_FileInformation *s, 75GNUNET_FS_file_information_set_filename (struct GNUNET_FS_FileInformation *s,
76 const char *filename) 76 const char *filename)
77{ 77{
78 GNUNET_free_non_null (s->filename); 78 GNUNET_free (s->filename);
79 if (filename) 79 if (filename)
80 s->filename = GNUNET_strdup (filename); 80 s->filename = GNUNET_strdup (filename);
81 else 81 else
@@ -426,7 +426,7 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
426 &fi->bo, 426 &fi->bo,
427 &no, 427 &no,
428 &fi->client_info); 428 &fi->client_info);
429 GNUNET_free_non_null (fi->data.dir.dir_data); 429 GNUNET_free (fi->data.dir.dir_data);
430 } 430 }
431 else 431 else
432 { 432 {
@@ -447,8 +447,8 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
447 &fi->data.file.do_index, 447 &fi->data.file.do_index,
448 &fi->client_info); 448 &fi->client_info);
449 } 449 }
450 GNUNET_free_non_null (fi->filename); 450 GNUNET_free (fi->filename);
451 GNUNET_free_non_null (fi->emsg); 451 GNUNET_free (fi->emsg);
452 if (NULL != fi->sks_uri) 452 if (NULL != fi->sks_uri)
453 GNUNET_FS_uri_destroy (fi->sks_uri); 453 GNUNET_FS_uri_destroy (fi->sks_uri);
454 if (NULL != fi->chk_uri) 454 if (NULL != fi->chk_uri)
@@ -462,7 +462,7 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
462 GNUNET_FS_uri_destroy (fi->keywords); 462 GNUNET_FS_uri_destroy (fi->keywords);
463 if (NULL != fi->meta) 463 if (NULL != fi->meta)
464 GNUNET_CONTAINER_meta_data_destroy (fi->meta); 464 GNUNET_CONTAINER_meta_data_destroy (fi->meta);
465 GNUNET_free_non_null (fi->serialization); 465 GNUNET_free (fi->serialization);
466 if (NULL != fi->te) 466 if (NULL != fi->te)
467 { 467 {
468 GNUNET_FS_tree_encoder_finish (fi->te, NULL); 468 GNUNET_FS_tree_encoder_finish (fi->te, NULL);
diff --git a/src/fs/fs_namespace.c b/src/fs/fs_namespace.c
index f098032d7..508f9cadc 100644
--- a/src/fs/fs_namespace.c
+++ b/src/fs/fs_namespace.c
@@ -301,8 +301,8 @@ read_update_information_graph (struct GNUNET_FS_Handle *h,
301 if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs)) 301 if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs))
302 { 302 {
303 GNUNET_break (0); 303 GNUNET_break (0);
304 GNUNET_free_non_null (n->id); 304 GNUNET_free (n->id);
305 GNUNET_free_non_null (n->update); 305 GNUNET_free (n->update);
306 if (n->md != NULL) 306 if (n->md != NULL)
307 GNUNET_CONTAINER_meta_data_destroy (n->md); 307 GNUNET_CONTAINER_meta_data_destroy (n->md);
308 GNUNET_free (n); 308 GNUNET_free (n);
@@ -315,7 +315,7 @@ read_update_information_graph (struct GNUNET_FS_Handle *h,
315 GNUNET_break (0); 315 GNUNET_break (0);
316 GNUNET_free (emsg); 316 GNUNET_free (emsg);
317 GNUNET_free (n->id); 317 GNUNET_free (n->id);
318 GNUNET_free_non_null (n->update); 318 GNUNET_free (n->update);
319 GNUNET_CONTAINER_meta_data_destroy (n->md); 319 GNUNET_CONTAINER_meta_data_destroy (n->md);
320 GNUNET_free (n); 320 GNUNET_free (n);
321 break; 321 break;
diff --git a/src/fs/fs_publish.c b/src/fs/fs_publish.c
index 8bb57b1e2..fddc65d67 100644
--- a/src/fs/fs_publish.c
+++ b/src/fs/fs_publish.c
@@ -85,9 +85,9 @@ publish_cleanup (struct GNUNET_FS_PublishContext *pc)
85 pc->fhc = NULL; 85 pc->fhc = NULL;
86 } 86 }
87 GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL); 87 GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL);
88 GNUNET_free_non_null (pc->nid); 88 GNUNET_free (pc->nid);
89 GNUNET_free_non_null (pc->nuid); 89 GNUNET_free (pc->nuid);
90 GNUNET_free_non_null (pc->serialization); 90 GNUNET_free (pc->serialization);
91 if (NULL != pc->dsh) 91 if (NULL != pc->dsh)
92 { 92 {
93 GNUNET_DATASTORE_disconnect (pc->dsh, GNUNET_NO); 93 GNUNET_DATASTORE_disconnect (pc->dsh, GNUNET_NO);
@@ -650,7 +650,7 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
650 dirpos->data.file.file_size, raw_data, 650 dirpos->data.file.file_size, raw_data,
651 &emsg)) 651 &emsg))
652 { 652 {
653 GNUNET_free_non_null (emsg); 653 GNUNET_free (emsg);
654 GNUNET_free (raw_data); 654 GNUNET_free (raw_data);
655 raw_data = NULL; 655 raw_data = NULL;
656 } 656 }
@@ -660,10 +660,10 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
660 } 660 }
661 GNUNET_FS_directory_builder_add (db, dirpos->chk_uri, dirpos->meta, 661 GNUNET_FS_directory_builder_add (db, dirpos->chk_uri, dirpos->meta,
662 raw_data); 662 raw_data);
663 GNUNET_free_non_null (raw_data); 663 GNUNET_free (raw_data);
664 dirpos = dirpos->next; 664 dirpos = dirpos->next;
665 } 665 }
666 GNUNET_free_non_null (p->data.dir.dir_data); 666 GNUNET_free (p->data.dir.dir_data);
667 p->data.dir.dir_data = NULL; 667 p->data.dir.dir_data = NULL;
668 p->data.dir.dir_size = 0; 668 p->data.dir.dir_size = 0;
669 GNUNET_FS_directory_builder_finish (db, &p->data.dir.dir_size, 669 GNUNET_FS_directory_builder_finish (db, &p->data.dir.dir_size,
@@ -1281,7 +1281,7 @@ suspend_operation (struct GNUNET_FS_FileInformation *fi,
1281 } 1281 }
1282 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1282 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1283 "Suspending publish operation\n"); 1283 "Suspending publish operation\n");
1284 GNUNET_free_non_null (fi->serialization); 1284 GNUNET_free (fi->serialization);
1285 fi->serialization = NULL; 1285 fi->serialization = NULL;
1286 off = (NULL == fi->chk_uri) ? 0 : (GNUNET_YES == fi->is_directory) ? 1286 off = (NULL == fi->chk_uri) ? 0 : (GNUNET_YES == fi->is_directory) ?
1287 fi->data.dir.dir_size : fi->data.file.file_size; 1287 fi->data.dir.dir_size : fi->data.file.file_size;
diff --git a/src/fs/fs_search.c b/src/fs/fs_search.c
index 8e2d7deba..3dbee43ef 100644
--- a/src/fs/fs_search.c
+++ b/src/fs/fs_search.c
@@ -830,7 +830,7 @@ process_kblock (struct GNUNET_FS_SearchContext *sc,
830 &pt[1], 830 &pt[1],
831 emsg); 831 emsg);
832 } 832 }
833 GNUNET_free_non_null (emsg); 833 GNUNET_free (emsg);
834 return; 834 return;
835 } 835 }
836 j = eos - pt + 1; 836 j = eos - pt + 1;
@@ -900,7 +900,7 @@ process_sblock (struct GNUNET_FS_SearchContext *sc,
900 _ ("Failed to parse URI `%s': %s\n"), 900 _ ("Failed to parse URI `%s': %s\n"),
901 uris, emsg); 901 uris, emsg);
902 GNUNET_break_op (0); /* ublock malformed */ 902 GNUNET_break_op (0); /* ublock malformed */
903 GNUNET_free_non_null (emsg); 903 GNUNET_free (emsg);
904 GNUNET_CONTAINER_meta_data_destroy (meta); 904 GNUNET_CONTAINER_meta_data_destroy (meta);
905 return; 905 return;
906 } 906 }
@@ -1548,10 +1548,10 @@ search_result_suspend (void *cls,
1548 sr->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc); 1548 sr->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc);
1549 } 1549 }
1550 GNUNET_break (NULL == sr->client_info); 1550 GNUNET_break (NULL == sr->client_info);
1551 GNUNET_free_non_null (sr->serialization); 1551 GNUNET_free (sr->serialization);
1552 GNUNET_FS_uri_destroy (sr->uri); 1552 GNUNET_FS_uri_destroy (sr->uri);
1553 GNUNET_CONTAINER_meta_data_destroy (sr->meta); 1553 GNUNET_CONTAINER_meta_data_destroy (sr->meta);
1554 GNUNET_free_non_null (sr->keyword_bitmap); 1554 GNUNET_free (sr->keyword_bitmap);
1555 GNUNET_free (sr); 1555 GNUNET_free (sr);
1556 return GNUNET_OK; 1556 return GNUNET_OK;
1557} 1557}
@@ -1596,10 +1596,10 @@ GNUNET_FS_search_signal_suspend_ (void *cls)
1596 GNUNET_free (sc->requests[i].keyword); 1596 GNUNET_free (sc->requests[i].keyword);
1597 } 1597 }
1598 } 1598 }
1599 GNUNET_free_non_null (sc->requests); 1599 GNUNET_free (sc->requests);
1600 GNUNET_free_non_null (sc->emsg); 1600 GNUNET_free (sc->emsg);
1601 GNUNET_FS_uri_destroy (sc->uri); 1601 GNUNET_FS_uri_destroy (sc->uri);
1602 GNUNET_free_non_null (sc->serialization); 1602 GNUNET_free (sc->serialization);
1603 GNUNET_free (sc); 1603 GNUNET_free (sc);
1604} 1604}
1605 1605
@@ -1760,10 +1760,10 @@ search_result_free (void *cls,
1760 GNUNET_break (NULL == sr->probe_ctx); 1760 GNUNET_break (NULL == sr->probe_ctx);
1761 GNUNET_break (NULL == sr->probe_cancel_task); 1761 GNUNET_break (NULL == sr->probe_cancel_task);
1762 GNUNET_break (NULL == sr->client_info); 1762 GNUNET_break (NULL == sr->client_info);
1763 GNUNET_free_non_null (sr->serialization); 1763 GNUNET_free (sr->serialization);
1764 GNUNET_FS_uri_destroy (sr->uri); 1764 GNUNET_FS_uri_destroy (sr->uri);
1765 GNUNET_CONTAINER_meta_data_destroy (sr->meta); 1765 GNUNET_CONTAINER_meta_data_destroy (sr->meta);
1766 GNUNET_free_non_null (sr->keyword_bitmap); 1766 GNUNET_free (sr->keyword_bitmap);
1767 GNUNET_free (sr); 1767 GNUNET_free (sr);
1768 return GNUNET_OK; 1768 return GNUNET_OK;
1769} 1769}
@@ -1825,8 +1825,8 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc)
1825 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++) 1825 for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
1826 GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results); 1826 GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results);
1827 } 1827 }
1828 GNUNET_free_non_null (sc->requests); 1828 GNUNET_free (sc->requests);
1829 GNUNET_free_non_null (sc->emsg); 1829 GNUNET_free (sc->emsg);
1830 GNUNET_FS_uri_destroy (sc->uri); 1830 GNUNET_FS_uri_destroy (sc->uri);
1831 GNUNET_free (sc); 1831 GNUNET_free (sc);
1832} 1832}
diff --git a/src/fs/fs_sharetree.c b/src/fs/fs_sharetree.c
index e291938b5..ac850076d 100644
--- a/src/fs/fs_sharetree.c
+++ b/src/fs/fs_sharetree.c
@@ -447,8 +447,8 @@ GNUNET_FS_share_tree_free (struct GNUNET_FS_ShareTreeItem *toplevel)
447 GNUNET_CONTAINER_meta_data_destroy (toplevel->meta); 447 GNUNET_CONTAINER_meta_data_destroy (toplevel->meta);
448 if (NULL != toplevel->ksk_uri) 448 if (NULL != toplevel->ksk_uri)
449 GNUNET_FS_uri_destroy (toplevel->ksk_uri); 449 GNUNET_FS_uri_destroy (toplevel->ksk_uri);
450 GNUNET_free_non_null (toplevel->filename); 450 GNUNET_free (toplevel->filename);
451 GNUNET_free_non_null (toplevel->short_filename); 451 GNUNET_free (toplevel->short_filename);
452 GNUNET_free (toplevel); 452 GNUNET_free (toplevel);
453} 453}
454 454
diff --git a/src/fs/fs_test_lib.c b/src/fs/fs_test_lib.c
index a0fe336df..dc4b214d9 100644
--- a/src/fs/fs_test_lib.c
+++ b/src/fs/fs_test_lib.c
@@ -195,7 +195,7 @@ report_uri (void *cls)
195 if ((GNUNET_YES != po->do_index) && 195 if ((GNUNET_YES != po->do_index) &&
196 (NULL != po->publish_tmp_file)) 196 (NULL != po->publish_tmp_file))
197 (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); 197 (void) GNUNET_DISK_directory_remove (po->publish_tmp_file);
198 GNUNET_free_non_null (po->publish_tmp_file); 198 GNUNET_free (po->publish_tmp_file);
199 GNUNET_free (po); 199 GNUNET_free (po);
200} 200}
201 201
@@ -217,7 +217,7 @@ publish_timeout (void *cls)
217 GNUNET_FS_publish_stop (po->publish_context); 217 GNUNET_FS_publish_stop (po->publish_context);
218 po->publish_cont (po->publish_cont_cls, NULL, NULL); 218 po->publish_cont (po->publish_cont_cls, NULL, NULL);
219 (void) GNUNET_DISK_directory_remove (po->publish_tmp_file); 219 (void) GNUNET_DISK_directory_remove (po->publish_tmp_file);
220 GNUNET_free_non_null (po->publish_tmp_file); 220 GNUNET_free (po->publish_tmp_file);
221 GNUNET_free (po); 221 GNUNET_free (po);
222} 222}
223 223
diff --git a/src/fs/fs_tree.c b/src/fs/fs_tree.c
index e7f922823..6203690d2 100644
--- a/src/fs/fs_tree.c
+++ b/src/fs/fs_tree.c
@@ -454,7 +454,7 @@ GNUNET_FS_tree_encoder_finish (struct GNUNET_FS_TreeEncoder *te,
454 if (emsg != NULL) 454 if (emsg != NULL)
455 *emsg = te->emsg; 455 *emsg = te->emsg;
456 else 456 else
457 GNUNET_free_non_null (te->emsg); 457 GNUNET_free (te->emsg);
458 GNUNET_free (te->chk_tree); 458 GNUNET_free (te->chk_tree);
459 GNUNET_free (te); 459 GNUNET_free (te);
460} 460}
diff --git a/src/fs/fs_unindex.c b/src/fs/fs_unindex.c
index f2315d7d0..8c27af9de 100644
--- a/src/fs/fs_unindex.c
+++ b/src/fs/fs_unindex.c
@@ -415,7 +415,7 @@ GNUNET_FS_unindex_do_extract_keywords_ (struct GNUNET_FS_UnindexContext *uc)
415 GNUNET_NO, ex, 415 GNUNET_NO, ex,
416 &unindex_directory_scan_cb, 416 &unindex_directory_scan_cb,
417 uc); 417 uc);
418 GNUNET_free_non_null (ex); 418 GNUNET_free (ex);
419} 419}
420 420
421 421
@@ -777,8 +777,8 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls)
777 UNINDEX_STATE_COMPLETE) ? uc->file_size : 0); 777 UNINDEX_STATE_COMPLETE) ? uc->file_size : 0);
778 GNUNET_break (NULL == uc->client_info); 778 GNUNET_break (NULL == uc->client_info);
779 GNUNET_free (uc->filename); 779 GNUNET_free (uc->filename);
780 GNUNET_free_non_null (uc->serialization); 780 GNUNET_free (uc->serialization);
781 GNUNET_free_non_null (uc->emsg); 781 GNUNET_free (uc->emsg);
782 GNUNET_free (uc); 782 GNUNET_free (uc);
783} 783}
784 784
@@ -892,7 +892,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc)
892 (uc->state == 892 (uc->state ==
893 UNINDEX_STATE_COMPLETE) ? uc->file_size : 0); 893 UNINDEX_STATE_COMPLETE) ? uc->file_size : 0);
894 GNUNET_break (NULL == uc->client_info); 894 GNUNET_break (NULL == uc->client_info);
895 GNUNET_free_non_null (uc->emsg); 895 GNUNET_free (uc->emsg);
896 GNUNET_free (uc->filename); 896 GNUNET_free (uc->filename);
897 GNUNET_free (uc); 897 GNUNET_free (uc);
898} 898}
diff --git a/src/fs/fs_uri.c b/src/fs/fs_uri.c
index 410f3c815..9c430ad9d 100644
--- a/src/fs/fs_uri.c
+++ b/src/fs/fs_uri.c
@@ -353,7 +353,7 @@ uri_ksk_parse (const char *s, char **emsg)
353 return ret; 353 return ret;
354CLEANUP: 354CLEANUP:
355 for (i = 0; i < max; i++) 355 for (i = 0; i < max; i++)
356 GNUNET_free_non_null (keywords[i]); 356 GNUNET_free (keywords[i]);
357 GNUNET_free (keywords); 357 GNUNET_free (keywords);
358 GNUNET_free (dup); 358 GNUNET_free (dup);
359 return NULL; 359 return NULL;
@@ -1172,7 +1172,7 @@ GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv)
1172 strlen (GNUNET_FS_URI_PREFIX))) && 1172 strlen (GNUNET_FS_URI_PREFIX))) &&
1173 (NULL != (uri = GNUNET_FS_uri_parse (argv[0], &emsg)))) 1173 (NULL != (uri = GNUNET_FS_uri_parse (argv[0], &emsg))))
1174 return uri; 1174 return uri;
1175 GNUNET_free_non_null (emsg); 1175 GNUNET_free (emsg);
1176 uri = GNUNET_new (struct GNUNET_FS_Uri); 1176 uri = GNUNET_new (struct GNUNET_FS_Uri);
1177 uri->type = GNUNET_FS_URI_KSK; 1177 uri->type = GNUNET_FS_URI_KSK;
1178 uri->data.ksk.keywordCount = argc; 1178 uri->data.ksk.keywordCount = argc;
@@ -1825,7 +1825,7 @@ GNUNET_FS_uri_ksk_create_from_meta_data (
1825 ret->data.ksk.keywords, 1825 ret->data.ksk.keywords,
1826 ret->data.ksk.keywordCount); 1826 ret->data.ksk.keywordCount);
1827 if (ent > 0) 1827 if (ent > 0)
1828 GNUNET_free_non_null (full_name); 1828 GNUNET_free (full_name);
1829 return ret; 1829 return ret;
1830} 1830}
1831 1831
diff --git a/src/fs/gnunet-auto-share.c b/src/fs/gnunet-auto-share.c
index 3aed0268b..ee4a719e0 100644
--- a/src/fs/gnunet-auto-share.c
+++ b/src/fs/gnunet-auto-share.c
@@ -227,13 +227,13 @@ load_state ()
227 return; 227 return;
228 rh = NULL; 228 rh = NULL;
229error: 229error:
230 GNUNET_free_non_null (fn); 230 GNUNET_free (fn);
231 if (NULL != rh) 231 if (NULL != rh)
232 (void) GNUNET_BIO_read_close (rh, &emsg); 232 (void) GNUNET_BIO_read_close (rh, &emsg);
233 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 233 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
234 _ ("Failed to load state: %s\n"), 234 _ ("Failed to load state: %s\n"),
235 emsg); 235 emsg);
236 GNUNET_free_non_null (emsg); 236 GNUNET_free (emsg);
237} 237}
238 238
239 239
@@ -781,7 +781,7 @@ main (int argc, char *const *argv)
781 shc_chld = NULL; 781 shc_chld = NULL;
782 GNUNET_DISK_pipe_close (sigpipe); 782 GNUNET_DISK_pipe_close (sigpipe);
783 sigpipe = NULL; 783 sigpipe = NULL;
784 GNUNET_free_non_null (cfg_filename); 784 GNUNET_free (cfg_filename);
785 cfg_filename = NULL; 785 cfg_filename = NULL;
786 GNUNET_free_nz ((void *) argv); 786 GNUNET_free_nz ((void *) argv);
787 return ok; 787 return ok;
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c
index 10a09f73b..ef5c40ae2 100644
--- a/src/fs/gnunet-directory.c
+++ b/src/fs/gnunet-directory.c
@@ -106,7 +106,7 @@ print_entry (void *cls,
106 GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL); 106 GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL);
107 printf ("\n"); 107 printf ("\n");
108 printf (_ ("Directory `%s' contents:\n"), name ? name : ""); 108 printf (_ ("Directory `%s' contents:\n"), name ? name : "");
109 GNUNET_free_non_null (name); 109 GNUNET_free (name);
110 return; 110 return;
111 } 111 }
112 string = GNUNET_FS_uri_to_string (uri); 112 string = GNUNET_FS_uri_to_string (uri);
@@ -114,7 +114,7 @@ print_entry (void *cls,
114 GNUNET_free (string); 114 GNUNET_free (string);
115 GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL); 115 GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL);
116 printf ("\n"); 116 printf ("\n");
117 GNUNET_free_non_null (name); 117 GNUNET_free (name);
118} 118}
119 119
120 120
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index b10e6163c..91fcd8f8a 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -729,7 +729,7 @@ identity_continuation (const char *args0)
729 _ ("Failed to access `%s': %s\n"), 729 _ ("Failed to access `%s': %s\n"),
730 args0, 730 args0,
731 strerror (errno)); 731 strerror (errno));
732 GNUNET_free_non_null (ex); 732 GNUNET_free (ex);
733 return; 733 return;
734 } 734 }
735 ds = GNUNET_FS_directory_scan_start (args0, 735 ds = GNUNET_FS_directory_scan_start (args0,
@@ -744,10 +744,10 @@ identity_continuation (const char *args0)
744 "%s", 744 "%s",
745 _ ( 745 _ (
746 "Failed to start meta directory scanner. Is gnunet-helper-publish-fs installed?\n")); 746 "Failed to start meta directory scanner. Is gnunet-helper-publish-fs installed?\n"));
747 GNUNET_free_non_null (ex); 747 GNUNET_free (ex);
748 return; 748 return;
749 } 749 }
750 GNUNET_free_non_null (ex); 750 GNUNET_free (ex);
751} 751}
752 752
753 753
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index 098633379..d25ae55e6 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -127,7 +127,7 @@ clean_task (void *cls)
127 _ ("Failed to write directory with search results to `%s'\n"), 127 _ ("Failed to write directory with search results to `%s'\n"),
128 output_filename); 128 output_filename);
129 } 129 }
130 GNUNET_free_non_null (ddata); 130 GNUNET_free (ddata);
131 GNUNET_free (output_filename); 131 GNUNET_free (output_filename);
132} 132}
133 133
@@ -197,7 +197,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
197 NULL); 197 NULL);
198 printf ("\n"); 198 printf ("\n");
199 fflush (stdout); 199 fflush (stdout);
200 GNUNET_free_non_null (filename); 200 GNUNET_free (filename);
201 GNUNET_free (uri); 201 GNUNET_free (uri);
202 results++; 202 results++;
203 if ((results_limit > 0) && (results >= results_limit)) 203 if ((results_limit > 0) && (results >= results_limit))
diff --git a/src/fs/gnunet-service-fs_pr.c b/src/fs/gnunet-service-fs_pr.c
index 71de5668b..150dd72e2 100644
--- a/src/fs/gnunet-service-fs_pr.c
+++ b/src/fs/gnunet-service-fs_pr.c
@@ -588,7 +588,7 @@ GSF_pending_request_get_message_ (struct GSF_PendingRequest *pr)
588 if (NULL != pr->public_data.target) 588 if (NULL != pr->public_data.target)
589 ext[k++] = *pr->public_data.target; 589 ext[k++] = *pr->public_data.target;
590 GNUNET_memcpy (&ext[k], bf_data, bf_size); 590 GNUNET_memcpy (&ext[k], bf_data, bf_size);
591 GNUNET_free_non_null (bf_data); 591 GNUNET_free (bf_data);
592 return env; 592 return env;
593} 593}
594 594
@@ -622,7 +622,7 @@ clean_request (void *cls, const struct GNUNET_HashCode *key, void *value)
622 cont (pr->llc_cont_cls, pr, pr->local_result); 622 cont (pr->llc_cont_cls, pr, pr->local_result);
623 } 623 }
624 GSF_plan_notify_request_done_ (pr); 624 GSF_plan_notify_request_done_ (pr);
625 GNUNET_free_non_null (pr->replies_seen); 625 GNUNET_free (pr->replies_seen);
626 GNUNET_BLOCK_group_destroy (pr->bg); 626 GNUNET_BLOCK_group_destroy (pr->bg);
627 pr->bg = NULL; 627 pr->bg = NULL;
628 GNUNET_PEER_change_rc (pr->sender_pid, -1); 628 GNUNET_PEER_change_rc (pr->sender_pid, -1);
diff --git a/src/fs/test_fs_file_information.c b/src/fs/test_fs_file_information.c
index 391b667cb..9305471d6 100644
--- a/src/fs/test_fs_file_information.c
+++ b/src/fs/test_fs_file_information.c
@@ -129,8 +129,8 @@ run (void *cls, char *const *args, const char *cfgfile,
129 GNUNET_FS_file_information_destroy (fidir, &mycleaner, NULL); 129 GNUNET_FS_file_information_destroy (fidir, &mycleaner, NULL);
130 GNUNET_DISK_directory_remove (fn1); 130 GNUNET_DISK_directory_remove (fn1);
131 GNUNET_DISK_directory_remove (fn2); 131 GNUNET_DISK_directory_remove (fn2);
132 GNUNET_free_non_null (fn1); 132 GNUNET_free (fn1);
133 GNUNET_free_non_null (fn2); 133 GNUNET_free (fn2);
134 GNUNET_FS_stop (fs); 134 GNUNET_FS_stop (fs);
135} 135}
136 136
diff --git a/src/fs/test_fs_namespace.c b/src/fs/test_fs_namespace.c
index 484884243..c1e10d575 100644
--- a/src/fs/test_fs_namespace.c
+++ b/src/fs/test_fs_namespace.c
@@ -190,7 +190,7 @@ publish_cont (void *cls, const struct GNUNET_FS_Uri *ksk_uri, const char *emsg)
190 fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg); 190 fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg);
191 err = 1; 191 err = 1;
192 GNUNET_FS_stop (fs); 192 GNUNET_FS_stop (fs);
193 GNUNET_free_non_null (msg); 193 GNUNET_free (msg);
194 return; 194 return;
195 } 195 }
196 ksk_search = 196 ksk_search =
diff --git a/src/gns/gns_tld_api.c b/src/gns/gns_tld_api.c
index 1db5baacb..3ebf07db6 100644
--- a/src/gns/gns_tld_api.c
+++ b/src/gns/gns_tld_api.c
@@ -340,7 +340,7 @@ GNUNET_GNS_lookup_with_tld_cancel (struct GNUNET_GNS_LookupWithTldRequest *ltr)
340 GNUNET_GNS_lookup_cancel (ltr->lr); 340 GNUNET_GNS_lookup_cancel (ltr->lr);
341 ltr->lr = NULL; 341 ltr->lr = NULL;
342 } 342 }
343 GNUNET_free_non_null (ltr->longest_match); 343 GNUNET_free (ltr->longest_match);
344 GNUNET_free (ltr->name); 344 GNUNET_free (ltr->name);
345 GNUNET_free (ltr); 345 GNUNET_free (ltr);
346 return ret; 346 return ret;
diff --git a/src/gns/gnunet-gns-import.c b/src/gns/gnunet-gns-import.c
index 2c7c56411..3c95e782d 100644
--- a/src/gns/gnunet-gns-import.c
+++ b/src/gns/gnunet-gns-import.c
@@ -346,9 +346,9 @@ get_ego (void *cls,
346static void 346static void
347shutdown_task (void *cls) 347shutdown_task (void *cls)
348{ 348{
349 GNUNET_free_non_null (master_zone_pkey); 349 GNUNET_free (master_zone_pkey);
350 master_zone_pkey = NULL; 350 master_zone_pkey = NULL;
351 GNUNET_free_non_null (private_zone_pkey); 351 GNUNET_free (private_zone_pkey);
352 private_zone_pkey = NULL; 352 private_zone_pkey = NULL;
353 if (NULL != list_it) 353 if (NULL != list_it)
354 { 354 {
diff --git a/src/gns/gnunet-gns-proxy.c b/src/gns/gnunet-gns-proxy.c
index eb6c6852e..d38204ef1 100644
--- a/src/gns/gnunet-gns-proxy.c
+++ b/src/gns/gnunet-gns-proxy.c
@@ -831,9 +831,9 @@ cleanup_s5r (struct Socks5Request *s5r)
831 GNUNET_CONTAINER_DLL_remove (s5r_head, 831 GNUNET_CONTAINER_DLL_remove (s5r_head,
832 s5r_tail, 832 s5r_tail,
833 s5r); 833 s5r);
834 GNUNET_free_non_null (s5r->domain); 834 GNUNET_free (s5r->domain);
835 GNUNET_free_non_null (s5r->leho); 835 GNUNET_free (s5r->leho);
836 GNUNET_free_non_null (s5r->url); 836 GNUNET_free (s5r->url);
837 for (unsigned int i = 0; i < s5r->num_danes; i++) 837 for (unsigned int i = 0; i < s5r->num_danes; i++)
838 GNUNET_free (s5r->dane_data[i]); 838 GNUNET_free (s5r->dane_data[i]);
839 GNUNET_free (s5r); 839 GNUNET_free (s5r);
@@ -1311,8 +1311,8 @@ curl_check_hdr (void *buffer,
1311 } 1311 }
1312cleanup: 1312cleanup:
1313 GNUNET_free (ndup); 1313 GNUNET_free (ndup);
1314 GNUNET_free_non_null (new_cookie_hdr); 1314 GNUNET_free (new_cookie_hdr);
1315 GNUNET_free_non_null (new_location); 1315 GNUNET_free (new_location);
1316 return bytes; 1316 return bytes;
1317} 1317}
1318 1318
@@ -2446,14 +2446,14 @@ kill_httpd (struct MhdHttpList *hd)
2446 GNUNET_CONTAINER_DLL_remove (mhd_httpd_head, 2446 GNUNET_CONTAINER_DLL_remove (mhd_httpd_head,
2447 mhd_httpd_tail, 2447 mhd_httpd_tail,
2448 hd); 2448 hd);
2449 GNUNET_free_non_null (hd->domain); 2449 GNUNET_free (hd->domain);
2450 MHD_stop_daemon (hd->daemon); 2450 MHD_stop_daemon (hd->daemon);
2451 if (NULL != hd->httpd_task) 2451 if (NULL != hd->httpd_task)
2452 { 2452 {
2453 GNUNET_SCHEDULER_cancel (hd->httpd_task); 2453 GNUNET_SCHEDULER_cancel (hd->httpd_task);
2454 hd->httpd_task = NULL; 2454 hd->httpd_task = NULL;
2455 } 2455 }
2456 GNUNET_free_non_null (hd->proxy_cert); 2456 GNUNET_free (hd->proxy_cert);
2457 if (hd == httpd) 2457 if (hd == httpd)
2458 httpd = NULL; 2458 httpd = NULL;
2459 GNUNET_free (hd); 2459 GNUNET_free (hd);
@@ -2657,7 +2657,7 @@ load_key_from_file (gnutls_x509_privkey_t key,
2657 _ ("Unable to import private key from file `%s'\n"), 2657 _ ("Unable to import private key from file `%s'\n"),
2658 keyfile); 2658 keyfile);
2659 } 2659 }
2660 GNUNET_free_non_null (key_data.data); 2660 GNUNET_free (key_data.data);
2661 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 2661 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
2662} 2662}
2663 2663
@@ -2689,7 +2689,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
2689 _ ("Unable to import certificate from `%s'\n"), 2689 _ ("Unable to import certificate from `%s'\n"),
2690 certfile); 2690 certfile);
2691 } 2691 }
2692 GNUNET_free_non_null (cert_data.data); 2692 GNUNET_free (cert_data.data);
2693 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 2693 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
2694} 2694}
2695 2695
@@ -2921,7 +2921,7 @@ setup_data_transfer (struct Socks5Request *s5r)
2921 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 2921 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
2922 _ ("Failed to pass client to MHD\n")); 2922 _ ("Failed to pass client to MHD\n"));
2923 cleanup_s5r (s5r); 2923 cleanup_s5r (s5r);
2924 GNUNET_free_non_null (domain); 2924 GNUNET_free (domain);
2925 return; 2925 return;
2926 } 2926 }
2927 s5r->hd = hd; 2927 s5r->hd = hd;
@@ -2929,7 +2929,7 @@ setup_data_transfer (struct Socks5Request *s5r)
2929 s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT, 2929 s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT,
2930 &timeout_s5r_handshake, 2930 &timeout_s5r_handshake,
2931 s5r); 2931 s5r);
2932 GNUNET_free_non_null (domain); 2932 GNUNET_free (domain);
2933} 2933}
2934 2934
2935 2935
@@ -3145,7 +3145,7 @@ handle_gns_result (void *cls,
3145 break; 3145 break;
3146 3146
3147 case GNUNET_GNSRECORD_TYPE_LEHO: 3147 case GNUNET_GNSRECORD_TYPE_LEHO:
3148 GNUNET_free_non_null (s5r->leho); 3148 GNUNET_free (s5r->leho);
3149 s5r->leho = GNUNET_strndup (r->data, 3149 s5r->leho = GNUNET_strndup (r->data,
3150 r->data_size); 3150 r->data_size);
3151 break; 3151 break;
@@ -3732,10 +3732,10 @@ run (void *cls,
3732 gnutls_x509_crt_deinit (proxy_ca.cert); 3732 gnutls_x509_crt_deinit (proxy_ca.cert);
3733 gnutls_x509_privkey_deinit (proxy_ca.key); 3733 gnutls_x509_privkey_deinit (proxy_ca.key);
3734 gnutls_global_deinit (); 3734 gnutls_global_deinit ();
3735 GNUNET_free_non_null (cafile_cfg); 3735 GNUNET_free (cafile_cfg);
3736 return; 3736 return;
3737 } 3737 }
3738 GNUNET_free_non_null (cafile_cfg); 3738 GNUNET_free (cafile_cfg);
3739 if (NULL == (gns_handle = GNUNET_GNS_connect (cfg))) 3739 if (NULL == (gns_handle = GNUNET_GNS_connect (cfg)))
3740 { 3740 {
3741 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 3741 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -3900,7 +3900,7 @@ main (int argc,
3900 options, 3900 options,
3901 &run, NULL)) ? 0 : 1; 3901 &run, NULL)) ? 0 : 1;
3902 MHD_destroy_response (curl_failure_response); 3902 MHD_destroy_response (curl_failure_response);
3903 GNUNET_free_non_null ((char *) argv); 3903 GNUNET_free_nz ((char *) argv);
3904 return ret; 3904 return ret;
3905} 3905}
3906 3906
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c
index 7d398c168..cb75b23c7 100644
--- a/src/gns/gnunet-service-gns_resolver.c
+++ b/src/gns/gnunet-service-gns_resolver.c
@@ -1675,7 +1675,7 @@ recursive_cname_resolution (struct GNS_ResolverHandle *rh,
1675 (off != rd->data_size)) 1675 (off != rd->data_size))
1676 { 1676 {
1677 GNUNET_break_op (0); /* record not well-formed */ 1677 GNUNET_break_op (0); /* record not well-formed */
1678 GNUNET_free_non_null (cname); 1678 GNUNET_free (cname);
1679 fail_resolution (rh); 1679 fail_resolution (rh);
1680 return; 1680 return;
1681 } 1681 }
@@ -1777,8 +1777,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
1777 (off != rd[i].data_size)) 1777 (off != rd[i].data_size))
1778 { 1778 {
1779 GNUNET_break_op (0); 1779 GNUNET_break_op (0);
1780 GNUNET_free_non_null (n); 1780 GNUNET_free (n);
1781 GNUNET_free_non_null (ip); 1781 GNUNET_free (ip);
1782 continue; 1782 continue;
1783 } 1783 }
1784 /* resolve 'ip' to determine the IP(s) of the DNS 1784 /* resolve 'ip' to determine the IP(s) of the DNS
@@ -1983,7 +1983,7 @@ handle_gns_resolution_result (void *cls,
1983 (off != rd[0].data_size)) 1983 (off != rd[0].data_size))
1984 { 1984 {
1985 GNUNET_break_op (0); 1985 GNUNET_break_op (0);
1986 GNUNET_free_non_null (cname); 1986 GNUNET_free (cname);
1987 fail_resolution (rh); 1987 fail_resolution (rh);
1988 return; 1988 return;
1989 } 1989 }
@@ -2137,7 +2137,7 @@ handle_gns_resolution_result (void *cls,
2137 rd_off++; 2137 rd_off++;
2138 } 2138 }
2139 } 2139 }
2140 GNUNET_free_non_null (cname); 2140 GNUNET_free (cname);
2141 } 2141 }
2142 break; 2142 break;
2143 2143
@@ -2993,7 +2993,7 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh)
2993 dr); 2993 dr);
2994 GNUNET_free (dr); 2994 GNUNET_free (dr);
2995 } 2995 }
2996 GNUNET_free_non_null (rh->leho); 2996 GNUNET_free (rh->leho);
2997 GNUNET_free (rh->name); 2997 GNUNET_free (rh->name);
2998 GNUNET_free (rh); 2998 GNUNET_free (rh);
2999} 2999}
diff --git a/src/gns/plugin_gnsrecord_gns.c b/src/gns/plugin_gnsrecord_gns.c
index 370bf1da4..81f2b9eff 100644
--- a/src/gns/plugin_gnsrecord_gns.c
+++ b/src/gns/plugin_gnsrecord_gns.c
@@ -75,14 +75,14 @@ gns_value_to_string (void *cls,
75 if (NULL == ns) 75 if (NULL == ns)
76 { 76 {
77 GNUNET_break_op (0); 77 GNUNET_break_op (0);
78 GNUNET_free_non_null (ns); 78 GNUNET_free (ns);
79 return NULL; 79 return NULL;
80 } 80 }
81 /* DNS server IP/name must be UTF-8 */ 81 /* DNS server IP/name must be UTF-8 */
82 ip = GNUNET_strdup (&((const char*) data)[off]); 82 ip = GNUNET_strdup (&((const char*) data)[off]);
83 GNUNET_asprintf (&nstr, "%s@%s", ns, ip); 83 GNUNET_asprintf (&nstr, "%s@%s", ns, ip);
84 GNUNET_free_non_null (ns); 84 GNUNET_free (ns);
85 GNUNET_free_non_null (ip); 85 GNUNET_free (ip);
86 return nstr; 86 return nstr;
87 } 87 }
88 88
diff --git a/src/gns/plugin_rest_gns.c b/src/gns/plugin_rest_gns.c
index feb333350..37313c529 100644
--- a/src/gns/plugin_rest_gns.c
+++ b/src/gns/plugin_rest_gns.c
@@ -461,7 +461,7 @@ libgnunet_plugin_rest_gns_done (void *cls)
461 461
462 plugin->cfg = NULL; 462 plugin->cfg = NULL;
463 463
464 GNUNET_free_non_null (allow_methods); 464 GNUNET_free (allow_methods);
465 GNUNET_free (api); 465 GNUNET_free (api);
466 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n"); 466 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n");
467 return NULL; 467 return NULL;
diff --git a/src/gns/test_gns_proxy.c b/src/gns/test_gns_proxy.c
index 12f3f8625..c0002673b 100644
--- a/src/gns/test_gns_proxy.c
+++ b/src/gns/test_gns_proxy.c
@@ -139,7 +139,7 @@ load_key_from_file (gnutls_x509_privkey_t key,
139 _ ("Unable to import private key from file `%s'\n"), 139 _ ("Unable to import private key from file `%s'\n"),
140 keyfile); 140 keyfile);
141 } 141 }
142 GNUNET_free_non_null (key_data.data); 142 GNUNET_free (key_data.data);
143 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 143 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
144} 144}
145 145
@@ -171,7 +171,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
171 _ ("Unable to import certificate from `%s'\n"), 171 _ ("Unable to import certificate from `%s'\n"),
172 certfile); 172 certfile);
173 } 173 }
174 GNUNET_free_non_null (cert_data.data); 174 GNUNET_free (cert_data.data);
175 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK; 175 return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
176} 176}
177 177
@@ -245,7 +245,7 @@ do_shutdown ()
245 MHD_stop_daemon (mhd); 245 MHD_stop_daemon (mhd);
246 mhd = NULL; 246 mhd = NULL;
247 } 247 }
248 GNUNET_free_non_null (url); 248 GNUNET_free (url);
249 249
250 if (NULL != proxy_proc) 250 if (NULL != proxy_proc)
251 { 251 {
@@ -568,7 +568,7 @@ main (int argc, char *const *argv)
568 options, 568 options,
569 &run, NULL)) 569 &run, NULL))
570 return 1; 570 return 1;
571 GNUNET_free_non_null ((char *) argv); 571 GNUNET_free ((char *) argv);
572 return global_ret; 572 return global_ret;
573} 573}
574 574
diff --git a/src/gnsrecord/gnsrecord.c b/src/gnsrecord/gnsrecord.c
index 82fb71c06..c6ebd7c29 100644
--- a/src/gnsrecord/gnsrecord.c
+++ b/src/gnsrecord/gnsrecord.c
@@ -124,7 +124,7 @@ GNSRECORD_fini ()
124 GNUNET_free (plugin->library_name); 124 GNUNET_free (plugin->library_name);
125 GNUNET_free (plugin); 125 GNUNET_free (plugin);
126 } 126 }
127 GNUNET_free_non_null (gns_plugins); 127 GNUNET_free (gns_plugins);
128 gns_plugins = NULL; 128 gns_plugins = NULL;
129 once = 0; 129 once = 0;
130 num_plugins = 0; 130 num_plugins = 0;
diff --git a/src/gnsrecord/plugin_gnsrecord_dns.c b/src/gnsrecord/plugin_gnsrecord_dns.c
index 5410d9546..9ac6fb9e6 100644
--- a/src/gnsrecord/plugin_gnsrecord_dns.c
+++ b/src/gnsrecord/plugin_gnsrecord_dns.c
@@ -65,7 +65,7 @@ dns_value_to_string (void *cls,
65 if ((NULL == ns) || (off != data_size)) 65 if ((NULL == ns) || (off != data_size))
66 { 66 {
67 GNUNET_break_op (0); 67 GNUNET_break_op (0);
68 GNUNET_free_non_null (ns); 68 GNUNET_free (ns);
69 return NULL; 69 return NULL;
70 } 70 }
71 return ns; 71 return ns;
@@ -80,7 +80,7 @@ dns_value_to_string (void *cls,
80 if ((NULL == cname) || (off != data_size)) 80 if ((NULL == cname) || (off != data_size))
81 { 81 {
82 GNUNET_break_op (0); 82 GNUNET_break_op (0);
83 GNUNET_free_non_null (cname); 83 GNUNET_free (cname);
84 return NULL; 84 return NULL;
85 } 85 }
86 return cname; 86 return cname;
@@ -121,7 +121,7 @@ dns_value_to_string (void *cls,
121 if ((NULL == ptr) || (off != data_size)) 121 if ((NULL == ptr) || (off != data_size))
122 { 122 {
123 GNUNET_break_op (0); 123 GNUNET_break_op (0);
124 GNUNET_free_non_null (ptr); 124 GNUNET_free (ptr);
125 return NULL; 125 return NULL;
126 } 126 }
127 return ptr; 127 return ptr;
diff --git a/src/hello/hello-ng.c b/src/hello/hello-ng.c
index d06feadd5..dd3480a48 100644
--- a/src/hello/hello-ng.c
+++ b/src/hello/hello-ng.c
@@ -153,7 +153,7 @@ GNUNET_HELLO_extract_address (const void *raw,
153 GNUNET_STRINGS_base64_decode (raws, sc - raws, (void **) &sig)) 153 GNUNET_STRINGS_base64_decode (raws, sc - raws, (void **) &sig))
154 { 154 {
155 GNUNET_break_op (0); 155 GNUNET_break_op (0);
156 GNUNET_free_non_null (sig); 156 GNUNET_free (sig);
157 return NULL; 157 return NULL;
158 } 158 }
159 raw_addr = sc3 + 1; 159 raw_addr = sc3 + 1;
diff --git a/src/hello/hello.c b/src/hello/hello.c
index 11eec9898..fa859a772 100644
--- a/src/hello/hello.c
+++ b/src/hello/hello.c
@@ -300,7 +300,7 @@ GNUNET_HELLO_iterate_addresses (const struct GNUNET_HELLO_Message *msg,
300 if (0 == esize) 300 if (0 == esize)
301 { 301 {
302 GNUNET_break (0); 302 GNUNET_break (0);
303 GNUNET_free_non_null (ret); 303 GNUNET_free (ret);
304 return NULL; 304 return NULL;
305 } 305 }
306 /* need GNUNET_memcpy() due to possibility of misalignment */ 306 /* need GNUNET_memcpy() due to possibility of misalignment */
diff --git a/src/hostlist/gnunet-daemon-hostlist_client.c b/src/hostlist/gnunet-daemon-hostlist_client.c
index c2e8f5d88..5dc2e7f2a 100644
--- a/src/hostlist/gnunet-daemon-hostlist_client.c
+++ b/src/hostlist/gnunet-daemon-hostlist_client.c
@@ -790,7 +790,7 @@ clean_up ()
790 curl_easy_cleanup (curl); 790 curl_easy_cleanup (curl);
791 curl = NULL; 791 curl = NULL;
792 } 792 }
793 GNUNET_free_non_null (current_url); 793 GNUNET_free (current_url);
794 current_url = NULL; 794 current_url = NULL;
795 stat_bytes_downloaded = 0; 795 stat_bytes_downloaded = 0;
796 stat_download_in_progress = GNUNET_NO; 796 stat_download_in_progress = GNUNET_NO;
@@ -1460,7 +1460,7 @@ load_hostlist_file ()
1460 linked_list_size, 1460 linked_list_size,
1461 GNUNET_NO); 1461 GNUNET_NO);
1462 1462
1463 GNUNET_free_non_null (uri); 1463 GNUNET_free (uri);
1464 emsg = NULL; 1464 emsg = NULL;
1465 (void) GNUNET_BIO_read_close (rh, &emsg); 1465 (void) GNUNET_BIO_read_close (rh, &emsg);
1466 if (emsg != NULL) 1466 if (emsg != NULL)
@@ -1657,15 +1657,15 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
1657 GNUNET_free (proxytype_str); 1657 GNUNET_free (proxytype_str);
1658 GNUNET_free (proxy); 1658 GNUNET_free (proxy);
1659 proxy = NULL; 1659 proxy = NULL;
1660 GNUNET_free_non_null (proxy_username); 1660 GNUNET_free (proxy_username);
1661 proxy_username = NULL; 1661 proxy_username = NULL;
1662 GNUNET_free_non_null (proxy_password); 1662 GNUNET_free (proxy_password);
1663 proxy_password = NULL; 1663 proxy_password = NULL;
1664 1664
1665 return GNUNET_SYSERR; 1665 return GNUNET_SYSERR;
1666 } 1666 }
1667 } 1667 }
1668 GNUNET_free_non_null (proxytype_str); 1668 GNUNET_free (proxytype_str);
1669 } 1669 }
1670 1670
1671 stat_learning = learn; 1671 stat_learning = learn;
@@ -1786,11 +1786,11 @@ GNUNET_HOSTLIST_client_stop ()
1786 ti_check_download = NULL; 1786 ti_check_download = NULL;
1787 curl_global_cleanup (); 1787 curl_global_cleanup ();
1788 } 1788 }
1789 GNUNET_free_non_null (proxy); 1789 GNUNET_free (proxy);
1790 proxy = NULL; 1790 proxy = NULL;
1791 GNUNET_free_non_null (proxy_username); 1791 GNUNET_free (proxy_username);
1792 proxy_username = NULL; 1792 proxy_username = NULL;
1793 GNUNET_free_non_null (proxy_password); 1793 GNUNET_free (proxy_password);
1794 proxy_password = NULL; 1794 proxy_password = NULL;
1795 if (NULL != pi) 1795 if (NULL != pi)
1796 { 1796 {
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c
index 999730e3e..b6c0495c0 100644
--- a/src/hostlist/gnunet-daemon-hostlist_server.c
+++ b/src/hostlist/gnunet-daemon-hostlist_server.c
@@ -229,7 +229,7 @@ host_processor (void *cls,
229 { 229 {
230 GNUNET_assert (NULL == peer); 230 GNUNET_assert (NULL == peer);
231 builder->pitr = NULL; 231 builder->pitr = NULL;
232 GNUNET_free_non_null (builder->data); 232 GNUNET_free (builder->data);
233 GNUNET_free (builder); 233 GNUNET_free (builder);
234 builder = NULL; 234 builder = NULL;
235 GNUNET_log (GNUNET_ERROR_TYPE_INFO, 235 GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -534,7 +534,7 @@ process_notify (void *cls,
534 GNUNET_PEERINFO_iterate_cancel (builder->pitr); 534 GNUNET_PEERINFO_iterate_cancel (builder->pitr);
535 builder->pitr = NULL; 535 builder->pitr = NULL;
536 } 536 }
537 GNUNET_free_non_null (builder->data); 537 GNUNET_free (builder->data);
538 builder->size = 0; 538 builder->size = 0;
539 builder->data = NULL; 539 builder->data = NULL;
540 } 540 }
@@ -886,7 +886,7 @@ GNUNET_HOSTLIST_server_stop ()
886 GNUNET_PEERINFO_iterate_cancel (builder->pitr); 886 GNUNET_PEERINFO_iterate_cancel (builder->pitr);
887 builder->pitr = NULL; 887 builder->pitr = NULL;
888 } 888 }
889 GNUNET_free_non_null (builder->data); 889 GNUNET_free (builder->data);
890 GNUNET_free (builder); 890 GNUNET_free (builder);
891 builder = NULL; 891 builder = NULL;
892 } 892 }
diff --git a/src/hostlist/test_gnunet_daemon_hostlist_learning.c b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
index a45721521..a50e7acc2 100644
--- a/src/hostlist/test_gnunet_daemon_hostlist_learning.c
+++ b/src/hostlist/test_gnunet_daemon_hostlist_learning.c
@@ -390,7 +390,7 @@ handle_ad_arrive (void *cls,
390 expected_uri, 390 expected_uri,
391 current_adv_uri); 391 current_adv_uri);
392 GNUNET_free (expected_uri); 392 GNUNET_free (expected_uri);
393 GNUNET_free_non_null (hostname); 393 GNUNET_free (hostname);
394} 394}
395 395
396 396
diff --git a/src/identity/plugin_rest_identity.c b/src/identity/plugin_rest_identity.c
index 009a01f16..5aca07ddf 100644
--- a/src/identity/plugin_rest_identity.c
+++ b/src/identity/plugin_rest_identity.c
@@ -1422,7 +1422,7 @@ libgnunet_plugin_rest_identity_done (void *cls)
1422 1422
1423 plugin->cfg = NULL; 1423 plugin->cfg = NULL;
1424 1424
1425 GNUNET_free_non_null (allow_methods); 1425 GNUNET_free (allow_methods);
1426 GNUNET_free (api); 1426 GNUNET_free (api);
1427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity REST plugin is finished\n"); 1427 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity REST plugin is finished\n");
1428 return NULL; 1428 return NULL;
diff --git a/src/include/gnunet_common.h b/src/include/gnunet_common.h
index 68993b51d..b2f99cd55 100644
--- a/src/include/gnunet_common.h
+++ b/src/include/gnunet_common.h
@@ -770,6 +770,12 @@ GNUNET_e2s2 (const struct GNUNET_CRYPTO_EcdhePublicKey *p);
770 770
771 771
772/** 772/**
773 * Forward declaration to make compiler happy depending on include order.
774 */
775struct GNUNET_PeerIdentity;
776
777
778/**
773 * @ingroup logging 779 * @ingroup logging
774 * Convert a peer identity to a string (for printing debug messages). 780 * Convert a peer identity to a string (for printing debug messages).
775 * This is one of the very few calls in the entire API that is 781 * This is one of the very few calls in the entire API that is
@@ -1275,6 +1281,7 @@ GNUNET_is_zero_ (const void *a,
1275#define GNUNET_malloc_large(size) \ 1281#define GNUNET_malloc_large(size) \
1276 GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__) 1282 GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__)
1277 1283
1284
1278/** 1285/**
1279 * @ingroup memory 1286 * @ingroup memory
1280 * Wrapper around realloc. Reallocates size bytes of memory. 1287 * Wrapper around realloc. Reallocates size bytes of memory.
@@ -1287,6 +1294,7 @@ GNUNET_is_zero_ (const void *a,
1287#define GNUNET_realloc(ptr, size) \ 1294#define GNUNET_realloc(ptr, size) \
1288 GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__) 1295 GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__)
1289 1296
1297
1290/** 1298/**
1291 * @ingroup memory 1299 * @ingroup memory
1292 * Wrapper around free. Frees the memory referred to by ptr. 1300 * Wrapper around free. Frees the memory referred to by ptr.
@@ -1294,40 +1302,27 @@ GNUNET_is_zero_ (const void *a,
1294 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz. 1302 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz.
1295 * 1303 *
1296 * @param ptr location where to free the memory. ptr must have 1304 * @param ptr location where to free the memory. ptr must have
1297 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. 1305 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed.
1298 */ 1306 */
1299#define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__) 1307#define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__)
1300 1308
1309
1301/** 1310/**
1302 * @ingroup memory 1311 * @ingroup memory
1303 * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL. 1312 * Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL.
1304 * Note that it is generally better to free memory that was 1313 * Note that it is generally better to free memory that was
1305 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free. 1314 * allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free.
1306 * 1315 *
1316 * @a ptr will be set to NULL. Use #GNUNET_free_nz() if @a ptr is not an L-value.
1317 *
1307 * @param ptr location where to free the memory. ptr must have 1318 * @param ptr location where to free the memory. ptr must have
1308 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. 1319 * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed.
1309 */ 1320 */
1310#define GNUNET_free(ptr) do { \ 1321#define GNUNET_free(ptr) do { \
1311 GNUNET_xfree_ (ptr, __FILE__, __LINE__); \ 1322 GNUNET_xfree_ (ptr, __FILE__, __LINE__); \
1312 ptr = NULL; \ 1323 ptr = NULL; \
1313} while (0) 1324} while (0)
1314 1325
1315/**
1316 * @ingroup memory
1317 * Free the memory pointed to by ptr if ptr is not NULL.
1318 * Equivalent to `if (NULL != ptr) GNUNET_free(ptr)`.
1319 *
1320 * @param ptr the location in memory to free
1321 */
1322#define GNUNET_free_non_null(ptr) \
1323 do \
1324 { \
1325 void *__x__ = ptr; \
1326 if (NULL != __x__) \
1327 { \
1328 GNUNET_free (__x__); \
1329 } \
1330 } while (0)
1331 1326
1332/** 1327/**
1333 * @ingroup memory 1328 * @ingroup memory
diff --git a/src/mysql/mysql.c b/src/mysql/mysql.c
index 76effd95a..713227068 100644
--- a/src/mysql/mysql.c
+++ b/src/mysql/mysql.c
@@ -296,9 +296,9 @@ iopen (struct GNUNET_MYSQL_Context *mc)
296 (unsigned int) mysql_port, 296 (unsigned int) mysql_port,
297 NULL, 297 NULL,
298 CLIENT_IGNORE_SIGPIPE); 298 CLIENT_IGNORE_SIGPIPE);
299 GNUNET_free_non_null (mysql_server); 299 GNUNET_free (mysql_server);
300 GNUNET_free_non_null (mysql_user); 300 GNUNET_free (mysql_user);
301 GNUNET_free_non_null (mysql_password); 301 GNUNET_free (mysql_password);
302 GNUNET_free (mysql_dbname); 302 GNUNET_free (mysql_dbname);
303 if (mysql_error (mc->dbf)[0]) 303 if (mysql_error (mc->dbf)[0])
304 { 304 {
diff --git a/src/namecache/plugin_namecache_sqlite.c b/src/namecache/plugin_namecache_sqlite.c
index 8f762cb40..c9d79ba2d 100644
--- a/src/namecache/plugin_namecache_sqlite.c
+++ b/src/namecache/plugin_namecache_sqlite.c
@@ -260,7 +260,7 @@ database_shutdown (struct Plugin *plugin)
260 GNUNET_ERROR_TYPE_ERROR, 260 GNUNET_ERROR_TYPE_ERROR,
261 "sqlite3_close"); 261 "sqlite3_close");
262 262
263 GNUNET_free_non_null (plugin->fn); 263 GNUNET_free (plugin->fn);
264} 264}
265 265
266 266
diff --git a/src/namestore/gnunet-namestore.c b/src/namestore/gnunet-namestore.c
index f438de136..704a4abf7 100644
--- a/src/namestore/gnunet-namestore.c
+++ b/src/namestore/gnunet-namestore.c
@@ -878,7 +878,7 @@ del_monitor (void *cls,
878 rd[i].data_size)))) || 878 rd[i].data_size)))) ||
879 (0 == strcmp (vs, value))))) 879 (0 == strcmp (vs, value)))))
880 rdx[rd_left++] = rd[i]; 880 rdx[rd_left++] = rd[i];
881 GNUNET_free_non_null (vs); 881 GNUNET_free (vs);
882 } 882 }
883 if (rd_count == rd_left) 883 if (rd_count == rd_left)
884 { 884 {
@@ -1307,7 +1307,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
1307 return; 1307 return;
1308 } 1308 }
1309 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego); 1309 zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
1310 GNUNET_free_non_null (ego_name); 1310 GNUNET_free (ego_name);
1311 ego_name = NULL; 1311 ego_name = NULL;
1312 run_with_zone_pkey (cfg); 1312 run_with_zone_pkey (cfg);
1313} 1313}
diff --git a/src/namestore/gnunet-service-namestore.c b/src/namestore/gnunet-service-namestore.c
index c57f15f65..ede566d40 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -540,7 +540,7 @@ cache_nick (const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone,
540 break; 540 break;
541 } 541 }
542 } 542 }
543 GNUNET_free_non_null (oldest->rd); 543 GNUNET_free (oldest->rd);
544 oldest->zone = *zone; 544 oldest->zone = *zone;
545 if (NULL != nick) 545 if (NULL != nick)
546 { 546 {
@@ -1392,7 +1392,7 @@ handle_record_lookup (void *cls, const struct LabelLookupMessage *ll_msg)
1392 GNUNET_memcpy (&llr_msg[1], name_tmp, name_len); 1392 GNUNET_memcpy (&llr_msg[1], name_tmp, name_len);
1393 GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len); 1393 GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len);
1394 GNUNET_MQ_send (nc->mq, env); 1394 GNUNET_MQ_send (nc->mq, env);
1395 GNUNET_free_non_null (rlc.res_rd); 1395 GNUNET_free (rlc.res_rd);
1396} 1396}
1397 1397
1398 1398
diff --git a/src/namestore/plugin_namestore_sqlite.c b/src/namestore/plugin_namestore_sqlite.c
index a909221e2..45fb782f7 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -296,7 +296,7 @@ database_shutdown (struct Plugin *plugin)
296 GNUNET_ERROR_TYPE_ERROR, 296 GNUNET_ERROR_TYPE_ERROR,
297 "sqlite3_close"); 297 "sqlite3_close");
298 298
299 GNUNET_free_non_null (plugin->fn); 299 GNUNET_free (plugin->fn);
300} 300}
301 301
302 302
diff --git a/src/namestore/plugin_rest_namestore.c b/src/namestore/plugin_rest_namestore.c
index 95b9b428f..4a05b2833 100644
--- a/src/namestore/plugin_rest_namestore.c
+++ b/src/namestore/plugin_rest_namestore.c
@@ -491,7 +491,7 @@ namestore_list_finished (void *cls)
491 resp = GNUNET_REST_create_response (result_str); 491 resp = GNUNET_REST_create_response (result_str);
492 MHD_add_response_header (resp, "Content-Type", "application/json"); 492 MHD_add_response_header (resp, "Content-Type", "application/json");
493 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 493 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
494 GNUNET_free_non_null (result_str); 494 GNUNET_free (result_str);
495 GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); 495 GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
496} 496}
497 497
@@ -1109,7 +1109,7 @@ libgnunet_plugin_rest_namestore_done (void *cls)
1109 1109
1110 plugin->cfg = NULL; 1110 plugin->cfg = NULL;
1111 1111
1112 GNUNET_free_non_null (allow_methods); 1112 GNUNET_free (allow_methods);
1113 GNUNET_free (api); 1113 GNUNET_free (api);
1114 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n"); 1114 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n");
1115 return NULL; 1115 return NULL;
diff --git a/src/namestore/test_namestore_api_lookup_nick.c b/src/namestore/test_namestore_api_lookup_nick.c
index 628e76254..2fbd9d7cb 100644
--- a/src/namestore/test_namestore_api_lookup_nick.c
+++ b/src/namestore/test_namestore_api_lookup_nick.c
@@ -58,7 +58,7 @@ static const char *name = "d";
58static void 58static void
59cleanup () 59cleanup ()
60{ 60{
61 GNUNET_free_non_null ((void *) rd_orig.data); 61 GNUNET_free ((void *) rd_orig.data);
62 if (NULL != nsh) 62 if (NULL != nsh)
63 { 63 {
64 GNUNET_NAMESTORE_disconnect (nsh); 64 GNUNET_NAMESTORE_disconnect (nsh);
diff --git a/src/namestore/test_namestore_api_monitoring.c b/src/namestore/test_namestore_api_monitoring.c
index cc00adf44..3f1be1403 100644
--- a/src/namestore/test_namestore_api_monitoring.c
+++ b/src/namestore/test_namestore_api_monitoring.c
@@ -88,9 +88,9 @@ do_shutdown ()
88 GNUNET_NAMESTORE_disconnect (nsh); 88 GNUNET_NAMESTORE_disconnect (nsh);
89 nsh = NULL; 89 nsh = NULL;
90 } 90 }
91 GNUNET_free_non_null (s_name_1); 91 GNUNET_free (s_name_1);
92 GNUNET_free_non_null (s_name_2); 92 GNUNET_free (s_name_2);
93 GNUNET_free_non_null (s_name_3); 93 GNUNET_free (s_name_3);
94 94
95 if (s_rd_1 != NULL) 95 if (s_rd_1 != NULL)
96 { 96 {
diff --git a/src/namestore/test_namestore_api_zone_iteration.c b/src/namestore/test_namestore_api_zone_iteration.c
index a363ee28d..5d02b9e49 100644
--- a/src/namestore/test_namestore_api_zone_iteration.c
+++ b/src/namestore/test_namestore_api_zone_iteration.c
@@ -88,9 +88,9 @@ end (void *cls)
88 GNUNET_SCHEDULER_cancel (endbadly_task); 88 GNUNET_SCHEDULER_cancel (endbadly_task);
89 endbadly_task = NULL; 89 endbadly_task = NULL;
90 } 90 }
91 GNUNET_free_non_null (s_name_1); 91 GNUNET_free (s_name_1);
92 GNUNET_free_non_null (s_name_2); 92 GNUNET_free (s_name_2);
93 GNUNET_free_non_null (s_name_3); 93 GNUNET_free (s_name_3);
94 if (NULL != s_rd_1) 94 if (NULL != s_rd_1)
95 { 95 {
96 GNUNET_free_nz ((void *) s_rd_1->data); 96 GNUNET_free_nz ((void *) s_rd_1->data);
diff --git a/src/namestore/test_namestore_api_zone_iteration_nick.c b/src/namestore/test_namestore_api_zone_iteration_nick.c
index 1ebdfd073..4e54a05d2 100644
--- a/src/namestore/test_namestore_api_zone_iteration_nick.c
+++ b/src/namestore/test_namestore_api_zone_iteration_nick.c
@@ -82,9 +82,9 @@ end (void *cls)
82 GNUNET_NAMESTORE_disconnect (nsh); 82 GNUNET_NAMESTORE_disconnect (nsh);
83 nsh = NULL; 83 nsh = NULL;
84 } 84 }
85 GNUNET_free_non_null (s_name_1); 85 GNUNET_free (s_name_1);
86 GNUNET_free_non_null (s_name_2); 86 GNUNET_free (s_name_2);
87 GNUNET_free_non_null (s_name_3); 87 GNUNET_free (s_name_3);
88 88
89 if (s_rd_1 != NULL) 89 if (s_rd_1 != NULL)
90 { 90 {
diff --git a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
index 0534da001..30920713f 100644
--- a/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
+++ b/src/namestore/test_namestore_api_zone_iteration_specific_zone.c
@@ -88,9 +88,9 @@ end (void *cls)
88 GNUNET_SCHEDULER_cancel (endbadly_task); 88 GNUNET_SCHEDULER_cancel (endbadly_task);
89 endbadly_task = NULL; 89 endbadly_task = NULL;
90 } 90 }
91 GNUNET_free_non_null (s_name_1); 91 GNUNET_free (s_name_1);
92 GNUNET_free_non_null (s_name_2); 92 GNUNET_free (s_name_2);
93 GNUNET_free_non_null (s_name_3); 93 GNUNET_free (s_name_3);
94 if (s_rd_1 != NULL) 94 if (s_rd_1 != NULL)
95 { 95 {
96 GNUNET_free_nz ((void *) s_rd_1->data); 96 GNUNET_free_nz ((void *) s_rd_1->data);
diff --git a/src/namestore/test_namestore_api_zone_iteration_stop.c b/src/namestore/test_namestore_api_zone_iteration_stop.c
index b71a8789c..bdcdd1706 100644
--- a/src/namestore/test_namestore_api_zone_iteration_stop.c
+++ b/src/namestore/test_namestore_api_zone_iteration_stop.c
@@ -75,9 +75,9 @@ end (void *cls)
75 GNUNET_NAMESTORE_disconnect (nsh); 75 GNUNET_NAMESTORE_disconnect (nsh);
76 nsh = NULL; 76 nsh = NULL;
77 } 77 }
78 GNUNET_free_non_null (s_name_1); 78 GNUNET_free (s_name_1);
79 GNUNET_free_non_null (s_name_2); 79 GNUNET_free (s_name_2);
80 GNUNET_free_non_null (s_name_3); 80 GNUNET_free (s_name_3);
81 if (s_rd_1 != NULL) 81 if (s_rd_1 != NULL)
82 { 82 {
83 GNUNET_free_nz ((void *) s_rd_1->data); 83 GNUNET_free_nz ((void *) s_rd_1->data);
diff --git a/src/nat-auto/gnunet-service-nat-auto_legacy.c b/src/nat-auto/gnunet-service-nat-auto_legacy.c
index 1817c2270..de7910588 100644
--- a/src/nat-auto/gnunet-service-nat-auto_legacy.c
+++ b/src/nat-auto/gnunet-service-nat-auto_legacy.c
@@ -791,7 +791,7 @@ test_icmp_server (struct GNUNET_NAT_AutoHandle *ah)
791 _ ("No working gnunet-helper-nat-server found\n")); 791 _ ("No working gnunet-helper-nat-server found\n"));
792 } 792 }
793err: 793err:
794 GNUNET_free_non_null (tmp); 794 GNUNET_free (tmp);
795 GNUNET_free (helper); 795 GNUNET_free (helper);
796 796
797 if ((GNUNET_OK == ext_ip) && 797 if ((GNUNET_OK == ext_ip) &&
@@ -853,7 +853,7 @@ test_icmp_client (struct GNUNET_NAT_AutoHandle *ah)
853 _ ("No working gnunet-helper-nat-server found\n")); 853 _ ("No working gnunet-helper-nat-server found\n"));
854 } 854 }
855err: 855err:
856 GNUNET_free_non_null (tmp); 856 GNUNET_free (tmp);
857 GNUNET_free (helper); 857 GNUNET_free (helper);
858 858
859 next_phase (ah); 859 next_phase (ah);
diff --git a/src/nat/gnunet-nat.c b/src/nat/gnunet-nat.c
index 5012d6455..0743a478d 100644
--- a/src/nat/gnunet-nat.c
+++ b/src/nat/gnunet-nat.c
@@ -392,15 +392,15 @@ run (void *cls,
392 &stun_read_task, 392 &stun_read_task,
393 NULL); 393 NULL);
394 } 394 }
395 GNUNET_free_non_null (remote_sa); 395 GNUNET_free (remote_sa);
396 GNUNET_free_non_null (local_sa); 396 GNUNET_free (local_sa);
397 test_finished (); 397 test_finished ();
398 return; 398 return;
399fail_and_shutdown: 399fail_and_shutdown:
400 global_ret = 1; 400 global_ret = 1;
401 GNUNET_SCHEDULER_shutdown (); 401 GNUNET_SCHEDULER_shutdown ();
402 GNUNET_free_non_null (remote_sa); 402 GNUNET_free (remote_sa);
403 GNUNET_free_non_null (local_sa); 403 GNUNET_free (local_sa);
404} 404}
405 405
406 406
diff --git a/src/nat/gnunet-service-nat.c b/src/nat/gnunet-service-nat.c
index 3b7d48c82..4dcc0312f 100644
--- a/src/nat/gnunet-service-nat.c
+++ b/src/nat/gnunet-service-nat.c
@@ -2009,7 +2009,7 @@ client_disconnect_cb (void *cls,
2009 ch->caddrs[i].mh = NULL; 2009 ch->caddrs[i].mh = NULL;
2010 } 2010 }
2011 } 2011 }
2012 GNUNET_free_non_null (ch->caddrs); 2012 GNUNET_free (ch->caddrs);
2013 while (NULL != (lal = ch->ext_addr_head)) 2013 while (NULL != (lal = ch->ext_addr_head))
2014 { 2014 {
2015 GNUNET_CONTAINER_DLL_remove (ch->ext_addr_head, 2015 GNUNET_CONTAINER_DLL_remove (ch->ext_addr_head,
@@ -2032,8 +2032,8 @@ client_disconnect_cb (void *cls,
2032 GNUNET_RESOLVER_request_cancel (ch->ext_dns); 2032 GNUNET_RESOLVER_request_cancel (ch->ext_dns);
2033 ch->ext_dns = NULL; 2033 ch->ext_dns = NULL;
2034 } 2034 }
2035 GNUNET_free_non_null (ch->hole_external); 2035 GNUNET_free (ch->hole_external);
2036 GNUNET_free_non_null (ch->section_name); 2036 GNUNET_free (ch->section_name);
2037 GNUNET_free (ch); 2037 GNUNET_free (ch);
2038} 2038}
2039 2039
diff --git a/src/nat/test_nat.c b/src/nat/test_nat.c
index 69a2f4218..a3072f712 100644
--- a/src/nat/test_nat.c
+++ b/src/nat/test_nat.c
@@ -108,7 +108,7 @@ process_if (void *cls,
108 108
109 if (addr == NULL) 109 if (addr == NULL)
110 return GNUNET_OK; 110 return GNUNET_OK;
111 GNUNET_free_non_null (data->addr); 111 GNUNET_free (data->addr);
112 data->addr = GNUNET_malloc (addrlen); 112 data->addr = GNUNET_malloc (addrlen);
113 GNUNET_memcpy (data->addr, addr, addrlen); 113 GNUNET_memcpy (data->addr, addr, addrlen);
114 data->addrlen = addrlen; 114 data->addrlen = addrlen;
diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c
index df6c169b5..739249a93 100644
--- a/src/peerinfo-tool/gnunet-peerinfo.c
+++ b/src/peerinfo-tool/gnunet-peerinfo.c
@@ -249,7 +249,7 @@ dump_pc (struct PrintContext *pc)
249 } 249 }
250 } 250 }
251 printf ("\n"); 251 printf ("\n");
252 GNUNET_free_non_null (pc->address_list); 252 GNUNET_free (pc->address_list);
253 GNUNET_CONTAINER_DLL_remove (pc_head, pc_tail, pc); 253 GNUNET_CONTAINER_DLL_remove (pc_head, pc_tail, pc);
254 GNUNET_free (pc); 254 GNUNET_free (pc);
255 if ((NULL == pc_head) && (NULL == pic)) 255 if ((NULL == pc_head) && (NULL == pic))
@@ -619,14 +619,14 @@ shutdown_task (void *cls)
619 for (i = 0; i < pc->address_list_size; i++) 619 for (i = 0; i < pc->address_list_size; i++)
620 { 620 {
621 ar = &pc->address_list[i]; 621 ar = &pc->address_list[i];
622 GNUNET_free_non_null (ar->result); 622 GNUNET_free (ar->result);
623 if (NULL != ar->atsc) 623 if (NULL != ar->atsc)
624 { 624 {
625 GNUNET_TRANSPORT_address_to_string_cancel (ar->atsc); 625 GNUNET_TRANSPORT_address_to_string_cancel (ar->atsc);
626 ar->atsc = NULL; 626 ar->atsc = NULL;
627 } 627 }
628 } 628 }
629 GNUNET_free_non_null (pc->address_list); 629 GNUNET_free (pc->address_list);
630 GNUNET_free (pc); 630 GNUNET_free (pc);
631 } 631 }
632 GPI_plugins_unload (); 632 GPI_plugins_unload ();
diff --git a/src/peerinfo-tool/plugin_rest_peerinfo.c b/src/peerinfo-tool/plugin_rest_peerinfo.c
index 514b14313..1ab6d6f75 100644
--- a/src/peerinfo-tool/plugin_rest_peerinfo.c
+++ b/src/peerinfo-tool/plugin_rest_peerinfo.c
@@ -359,7 +359,7 @@ peerinfo_list_finished (void *cls)
359 resp = GNUNET_REST_create_response (result_str); 359 resp = GNUNET_REST_create_response (result_str);
360 MHD_add_response_header (resp, "Content-Type", "application/json"); 360 MHD_add_response_header (resp, "Content-Type", "application/json");
361 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK); 361 handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
362 GNUNET_free_non_null (result_str); 362 GNUNET_free (result_str);
363 GNUNET_SCHEDULER_add_now (&cleanup_handle, handle); 363 GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
364} 364}
365 365
@@ -452,7 +452,7 @@ dump_pc (struct PrintContext *pc)
452 json_decref (temp_array); 452 json_decref (temp_array);
453 json_decref (response_entry); 453 json_decref (response_entry);
454 454
455 GNUNET_free_non_null (pc->address_list); 455 GNUNET_free (pc->address_list);
456 GNUNET_CONTAINER_DLL_remove (pc_head, 456 GNUNET_CONTAINER_DLL_remove (pc_head,
457 pc_tail, 457 pc_tail,
458 pc); 458 pc);
@@ -813,7 +813,7 @@ libgnunet_plugin_rest_peerinfo_done (void *cls)
813 813
814 plugin->cfg = NULL; 814 plugin->cfg = NULL;
815 815
816 GNUNET_free_non_null (allow_methods); 816 GNUNET_free (allow_methods);
817 GNUNET_free (api); 817 GNUNET_free (api);
818 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 818 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
819 "Peerinfo REST plugin is finished\n"); 819 "Peerinfo REST plugin is finished\n");
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c
index 27e0337ee..79af90dd4 100644
--- a/src/peerinfo/gnunet-service-peerinfo.c
+++ b/src/peerinfo/gnunet-service-peerinfo.c
@@ -443,8 +443,8 @@ add_host_to_known_hosts (const struct GNUNET_PeerIdentity *identity)
443 update_hello (identity, r.hello); 443 update_hello (identity, r.hello);
444 if (NULL != r.friend_only_hello) 444 if (NULL != r.friend_only_hello)
445 update_hello (identity, r.friend_only_hello); 445 update_hello (identity, r.friend_only_hello);
446 GNUNET_free_non_null (r.hello); 446 GNUNET_free (r.hello);
447 GNUNET_free_non_null (r.friend_only_hello); 447 GNUNET_free (r.friend_only_hello);
448 GNUNET_free (fn); 448 GNUNET_free (fn);
449 } 449 }
450 } 450 }
@@ -825,7 +825,7 @@ update_hello (const struct GNUNET_PeerIdentity *peer,
825 GNUNET_free (buffer); 825 GNUNET_free (buffer);
826 } 826 }
827 } 827 }
828 GNUNET_free_non_null (fn); 828 GNUNET_free (fn);
829 notify_all (host); 829 notify_all (host);
830} 830}
831 831
@@ -982,7 +982,7 @@ discard_hosts_helper (void *cls, const char *fn)
982 write_pos += new_hello_size; 982 write_pos += new_hello_size;
983 } 983 }
984 read_pos += cur_hello_size; 984 read_pos += cur_hello_size;
985 GNUNET_free_non_null (new_hello); 985 GNUNET_free (new_hello);
986 } 986 }
987 987
988 if (0 < write_pos) 988 if (0 < write_pos)
@@ -1209,8 +1209,8 @@ free_host_entry (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
1209 1209
1210 (void) cls; 1210 (void) cls;
1211 (void) key; 1211 (void) key;
1212 GNUNET_free_non_null (he->hello); 1212 GNUNET_free (he->hello);
1213 GNUNET_free_non_null (he->friend_only_hello); 1213 GNUNET_free (he->friend_only_hello);
1214 GNUNET_free (he); 1214 GNUNET_free (he);
1215 return GNUNET_YES; 1215 return GNUNET_YES;
1216} 1216}
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c
index 17f73d70a..db5aee0d5 100644
--- a/src/peerstore/peerstore_api.c
+++ b/src/peerstore/peerstore_api.c
@@ -676,7 +676,7 @@ GNUNET_PEERSTORE_iterate_cancel (struct GNUNET_PEERSTORE_IterateContext *ic)
676 { 676 {
677 GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic); 677 GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic);
678 GNUNET_free (ic->sub_system); 678 GNUNET_free (ic->sub_system);
679 GNUNET_free_non_null (ic->key); 679 GNUNET_free (ic->key);
680 GNUNET_free (ic); 680 GNUNET_free (ic);
681 } 681 }
682 else 682 else
diff --git a/src/peerstore/plugin_peerstore_flat.c b/src/peerstore/plugin_peerstore_flat.c
index 5efe9dddc..cc5b8b76b 100644
--- a/src/peerstore/plugin_peerstore_flat.c
+++ b/src/peerstore/plugin_peerstore_flat.c
@@ -450,7 +450,7 @@ database_setup (struct Plugin *plugin)
450 s); 450 s);
451 else 451 else
452 GNUNET_break (0); 452 GNUNET_break (0);
453 GNUNET_free_non_null (o); 453 GNUNET_free (o);
454 } 454 }
455 entry->value_size = GNUNET_STRINGS_base64_decode (value, 455 entry->value_size = GNUNET_STRINGS_base64_decode (value,
456 strlen (value), 456 strlen (value),
diff --git a/src/peerstore/plugin_peerstore_sqlite.c b/src/peerstore/plugin_peerstore_sqlite.c
index cf499a5df..ad69efdf4 100644
--- a/src/peerstore/plugin_peerstore_sqlite.c
+++ b/src/peerstore/plugin_peerstore_sqlite.c
@@ -639,7 +639,7 @@ database_shutdown (struct Plugin *plugin)
639 LOG_SQLITE (plugin, 639 LOG_SQLITE (plugin,
640 GNUNET_ERROR_TYPE_ERROR, 640 GNUNET_ERROR_TYPE_ERROR,
641 "sqlite3_close"); 641 "sqlite3_close");
642 GNUNET_free_non_null (plugin->fn); 642 GNUNET_free (plugin->fn);
643} 643}
644 644
645 645
diff --git a/src/pq/pq_connect.c b/src/pq/pq_connect.c
index 8da273b2b..405dca174 100644
--- a/src/pq/pq_connect.c
+++ b/src/pq/pq_connect.c
@@ -125,7 +125,7 @@ GNUNET_PQ_connect (const char *config_str,
125 GNUNET_PQ_reconnect (db); 125 GNUNET_PQ_reconnect (db);
126 if (NULL == db->conn) 126 if (NULL == db->conn)
127 { 127 {
128 GNUNET_free_non_null (db->load_path); 128 GNUNET_free (db->load_path);
129 GNUNET_free (db->config_str); 129 GNUNET_free (db->config_str);
130 GNUNET_free (db); 130 GNUNET_free (db);
131 return NULL; 131 return NULL;
@@ -495,9 +495,9 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
495 load_path, 495 load_path,
496 es, 496 es,
497 ps); 497 ps);
498 GNUNET_free_non_null (load_path); 498 GNUNET_free (load_path);
499 GNUNET_free_non_null (sp); 499 GNUNET_free (sp);
500 GNUNET_free_non_null (conninfo); 500 GNUNET_free (conninfo);
501 return db; 501 return db;
502} 502}
503 503
@@ -511,10 +511,10 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
511void 511void
512GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db) 512GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db)
513{ 513{
514 GNUNET_free_non_null (db->es); 514 GNUNET_free (db->es);
515 GNUNET_free_non_null (db->ps); 515 GNUNET_free (db->ps);
516 GNUNET_free_non_null (db->load_path); 516 GNUNET_free (db->load_path);
517 GNUNET_free_non_null (db->config_str); 517 GNUNET_free (db->config_str);
518 PQfinish (db->conn); 518 PQfinish (db->conn);
519 GNUNET_free (db); 519 GNUNET_free (db);
520} 520}
diff --git a/src/pq/pq_prepare.c b/src/pq/pq_prepare.c
index b7003fb69..63087456f 100644
--- a/src/pq/pq_prepare.c
+++ b/src/pq/pq_prepare.c
@@ -83,7 +83,7 @@ GNUNET_PQ_prepare_statements (struct GNUNET_PQ_Context *db,
83 memcpy (&rps[olen], 83 memcpy (&rps[olen],
84 ps, 84 ps,
85 nlen * sizeof (struct GNUNET_PQ_PreparedStatement)); 85 nlen * sizeof (struct GNUNET_PQ_PreparedStatement));
86 GNUNET_free_non_null (db->ps); 86 GNUNET_free (db->ps);
87 db->ps = rps; 87 db->ps = rps;
88 } 88 }
89 89
diff --git a/src/pt/test_gns_vpn.c b/src/pt/test_gns_vpn.c
index 69afca789..cf0455477 100644
--- a/src/pt/test_gns_vpn.c
+++ b/src/pt/test_gns_vpn.c
@@ -194,7 +194,7 @@ do_shutdown (void *cls)
194 GNUNET_NAMESTORE_disconnect (namestore); 194 GNUNET_NAMESTORE_disconnect (namestore);
195 namestore = NULL; 195 namestore = NULL;
196 } 196 }
197 GNUNET_free_non_null (url); 197 GNUNET_free (url);
198 url = NULL; 198 url = NULL;
199} 199}
200 200
diff --git a/src/pt/test_gnunet_vpn.c b/src/pt/test_gnunet_vpn.c
index cb9bb61fe..8ffadeca4 100644
--- a/src/pt/test_gnunet_vpn.c
+++ b/src/pt/test_gnunet_vpn.c
@@ -165,7 +165,7 @@ do_shutdown (void *cls)
165 GNUNET_VPN_disconnect (vpn); 165 GNUNET_VPN_disconnect (vpn);
166 vpn = NULL; 166 vpn = NULL;
167 } 167 }
168 GNUNET_free_non_null (url); 168 GNUNET_free (url);
169 url = NULL; 169 url = NULL;
170} 170}
171 171
diff --git a/src/reclaim/gnunet-reclaim.c b/src/reclaim/gnunet-reclaim.c
index e7ee814b6..6bef5b6fe 100644
--- a/src/reclaim/gnunet-reclaim.c
+++ b/src/reclaim/gnunet-reclaim.c
@@ -313,7 +313,7 @@ process_attrs (void *cls,
313 attr->flag, 313 attr->flag,
314 id, 314 id,
315 (NULL == attest) ? "" : "(ATTESTED)"); 315 (NULL == attest) ? "" : "(ATTESTED)");
316 GNUNET_free_non_null (value_str); 316 GNUNET_free (value_str);
317 GNUNET_free (id); 317 GNUNET_free (id);
318} 318}
319 319
diff --git a/src/reclaim/gnunet-service-reclaim_tickets.c b/src/reclaim/gnunet-service-reclaim_tickets.c
index 205886c78..f170b6d84 100644
--- a/src/reclaim/gnunet-service-reclaim_tickets.c
+++ b/src/reclaim/gnunet-service-reclaim_tickets.c
@@ -971,7 +971,7 @@ cleanup_cth (struct RECLAIM_TICKETS_ConsumeHandle *cth)
971 { 971 {
972 if (NULL != lu->lookup_request) 972 if (NULL != lu->lookup_request)
973 GNUNET_GNS_lookup_cancel (lu->lookup_request); 973 GNUNET_GNS_lookup_cancel (lu->lookup_request);
974 GNUNET_free_non_null (lu->label); 974 GNUNET_free (lu->label);
975 GNUNET_CONTAINER_DLL_remove (cth->parallel_lookups_head, 975 GNUNET_CONTAINER_DLL_remove (cth->parallel_lookups_head,
976 cth->parallel_lookups_tail, 976 cth->parallel_lookups_tail,
977 lu); 977 lu);
diff --git a/src/reclaim/oidc_helper.c b/src/reclaim/oidc_helper.c
index e309ed01d..ad2839200 100644
--- a/src/reclaim/oidc_helper.c
+++ b/src/reclaim/oidc_helper.c
@@ -616,7 +616,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
616 + sizeof(struct GNUNET_CRYPTO_EcdsaSignature)) 616 + sizeof(struct GNUNET_CRYPTO_EcdsaSignature))
617 { 617 {
618 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n"); 618 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n");
619 GNUNET_free_non_null (code_payload); 619 GNUNET_free (code_payload);
620 return GNUNET_SYSERR; 620 return GNUNET_SYSERR;
621 } 621 }
622 622
@@ -646,7 +646,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
646 { 646 {
647 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, 647 GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
648 "Expected code verifier!\n"); 648 "Expected code verifier!\n");
649 GNUNET_free_non_null (code_payload); 649 GNUNET_free (code_payload);
650 return GNUNET_SYSERR; 650 return GNUNET_SYSERR;
651 } 651 }
652 code_verifier_hash = GNUNET_malloc (256 / 8); 652 code_verifier_hash = GNUNET_malloc (256 / 8);
@@ -669,7 +669,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
669 expected_code_challenge, 669 expected_code_challenge,
670 code_challenge_len, 670 code_challenge_len,
671 code_challenge); 671 code_challenge);
672 GNUNET_free_non_null (code_payload); 672 GNUNET_free (code_payload);
673 GNUNET_free (expected_code_challenge); 673 GNUNET_free (expected_code_challenge);
674 return GNUNET_SYSERR; 674 return GNUNET_SYSERR;
675 } 675 }
diff --git a/src/reclaim/plugin_rest_openid_connect.c b/src/reclaim/plugin_rest_openid_connect.c
index 563bdd749..36ae937c1 100644
--- a/src/reclaim/plugin_rest_openid_connect.c
+++ b/src/reclaim/plugin_rest_openid_connect.c
@@ -557,12 +557,12 @@ cleanup_handle (struct RequestHandle *handle)
557 GNUNET_RECLAIM_cancel (handle->idp_op); 557 GNUNET_RECLAIM_cancel (handle->idp_op);
558 if (NULL != handle->idp) 558 if (NULL != handle->idp)
559 GNUNET_RECLAIM_disconnect (handle->idp); 559 GNUNET_RECLAIM_disconnect (handle->idp);
560 GNUNET_free_non_null (handle->url); 560 GNUNET_free (handle->url);
561 GNUNET_free_non_null (handle->tld); 561 GNUNET_free (handle->tld);
562 GNUNET_free_non_null (handle->redirect_prefix); 562 GNUNET_free (handle->redirect_prefix);
563 GNUNET_free_non_null (handle->redirect_suffix); 563 GNUNET_free (handle->redirect_suffix);
564 GNUNET_free_non_null (handle->emsg); 564 GNUNET_free (handle->emsg);
565 GNUNET_free_non_null (handle->edesc); 565 GNUNET_free (handle->edesc);
566 if (NULL != handle->gns_op) 566 if (NULL != handle->gns_op)
567 GNUNET_GNS_lookup_cancel (handle->gns_op); 567 GNUNET_GNS_lookup_cancel (handle->gns_op);
568 if (NULL != handle->gns_handle) 568 if (NULL != handle->gns_handle)
@@ -572,13 +572,13 @@ cleanup_handle (struct RequestHandle *handle)
572 GNUNET_NAMESTORE_disconnect (handle->namestore_handle); 572 GNUNET_NAMESTORE_disconnect (handle->namestore_handle);
573 if (NULL != handle->oidc) 573 if (NULL != handle->oidc)
574 { 574 {
575 GNUNET_free_non_null (handle->oidc->client_id); 575 GNUNET_free (handle->oidc->client_id);
576 GNUNET_free_non_null (handle->oidc->login_identity); 576 GNUNET_free (handle->oidc->login_identity);
577 GNUNET_free_non_null (handle->oidc->nonce); 577 GNUNET_free (handle->oidc->nonce);
578 GNUNET_free_non_null (handle->oidc->redirect_uri); 578 GNUNET_free (handle->oidc->redirect_uri);
579 GNUNET_free_non_null (handle->oidc->response_type); 579 GNUNET_free (handle->oidc->response_type);
580 GNUNET_free_non_null (handle->oidc->scope); 580 GNUNET_free (handle->oidc->scope);
581 GNUNET_free_non_null (handle->oidc->state); 581 GNUNET_free (handle->oidc->state);
582 json_decref (handle->oidc->response); 582 json_decref (handle->oidc->response);
583 GNUNET_free (handle->oidc); 583 GNUNET_free (handle->oidc);
584 } 584 }
@@ -594,8 +594,8 @@ cleanup_handle (struct RequestHandle *handle)
594 GNUNET_CONTAINER_DLL_remove (handle->ego_head, 594 GNUNET_CONTAINER_DLL_remove (handle->ego_head,
595 handle->ego_tail, 595 handle->ego_tail,
596 ego_entry); 596 ego_entry);
597 GNUNET_free_non_null (ego_entry->identifier); 597 GNUNET_free (ego_entry->identifier);
598 GNUNET_free_non_null (ego_entry->keystring); 598 GNUNET_free (ego_entry->keystring);
599 GNUNET_free (ego_entry); 599 GNUNET_free (ego_entry);
600 } 600 }
601 GNUNET_free (handle); 601 GNUNET_free (handle);
@@ -1734,7 +1734,7 @@ login_cont (struct GNUNET_REST_RequestHandle *con_handle,
1734 OIDC_COOKIE_EXPIRATION)); 1734 OIDC_COOKIE_EXPIRATION));
1735 last_time = 1735 last_time =
1736 GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key); 1736 GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key);
1737 GNUNET_free_non_null (last_time); 1737 GNUNET_free (last_time);
1738 GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map, 1738 GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map,
1739 &cache_key, 1739 &cache_key,
1740 current_time, 1740 current_time,
@@ -1804,7 +1804,7 @@ check_authorization (struct RequestHandle *handle,
1804 client_id = strtok (basic_authorization, ":"); 1804 client_id = strtok (basic_authorization, ":");
1805 if (NULL == client_id) 1805 if (NULL == client_id)
1806 { 1806 {
1807 GNUNET_free_non_null (basic_authorization); 1807 GNUNET_free (basic_authorization);
1808 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); 1808 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
1809 handle->response_code = MHD_HTTP_UNAUTHORIZED; 1809 handle->response_code = MHD_HTTP_UNAUTHORIZED;
1810 return GNUNET_SYSERR; 1810 return GNUNET_SYSERR;
@@ -1812,7 +1812,7 @@ check_authorization (struct RequestHandle *handle,
1812 pass = strtok (NULL, ":"); 1812 pass = strtok (NULL, ":");
1813 if (NULL == pass) 1813 if (NULL == pass)
1814 { 1814 {
1815 GNUNET_free_non_null (basic_authorization); 1815 GNUNET_free (basic_authorization);
1816 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); 1816 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
1817 handle->response_code = MHD_HTTP_UNAUTHORIZED; 1817 handle->response_code = MHD_HTTP_UNAUTHORIZED;
1818 return GNUNET_SYSERR; 1818 return GNUNET_SYSERR;
@@ -1826,7 +1826,7 @@ check_authorization (struct RequestHandle *handle,
1826 { 1826 {
1827 if (0 != strcmp (expected_pass, pass)) 1827 if (0 != strcmp (expected_pass, pass))
1828 { 1828 {
1829 GNUNET_free_non_null (basic_authorization); 1829 GNUNET_free (basic_authorization);
1830 GNUNET_free (expected_pass); 1830 GNUNET_free (expected_pass);
1831 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); 1831 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
1832 handle->response_code = MHD_HTTP_UNAUTHORIZED; 1832 handle->response_code = MHD_HTTP_UNAUTHORIZED;
@@ -1836,7 +1836,7 @@ check_authorization (struct RequestHandle *handle,
1836 } 1836 }
1837 else 1837 else
1838 { 1838 {
1839 GNUNET_free_non_null (basic_authorization); 1839 GNUNET_free (basic_authorization);
1840 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR); 1840 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR);
1841 handle->edesc = GNUNET_strdup ("gnunet configuration failed"); 1841 handle->edesc = GNUNET_strdup ("gnunet configuration failed");
1842 handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; 1842 handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
@@ -1852,7 +1852,7 @@ check_authorization (struct RequestHandle *handle,
1852 } 1852 }
1853 if (NULL == handle->ego_entry) 1853 if (NULL == handle->ego_entry)
1854 { 1854 {
1855 GNUNET_free_non_null (basic_authorization); 1855 GNUNET_free (basic_authorization);
1856 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT); 1856 handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
1857 handle->response_code = MHD_HTTP_UNAUTHORIZED; 1857 handle->response_code = MHD_HTTP_UNAUTHORIZED;
1858 return GNUNET_SYSERR; 1858 return GNUNET_SYSERR;
@@ -2504,7 +2504,7 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
2504 while (GNUNET_YES == 2504 while (GNUNET_YES ==
2505 GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, 2505 GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL,
2506 value)) 2506 value))
2507 GNUNET_free_non_null (value); 2507 GNUNET_free (value);
2508 GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); 2508 GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
2509 GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map); 2509 GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map);
2510 2510
@@ -2513,10 +2513,10 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
2513 while (GNUNET_YES == 2513 while (GNUNET_YES ==
2514 GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL, 2514 GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL,
2515 value)) 2515 value))
2516 GNUNET_free_non_null (value); 2516 GNUNET_free (value);
2517 GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map); 2517 GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map);
2518 GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it); 2518 GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
2519 GNUNET_free_non_null (allow_methods); 2519 GNUNET_free (allow_methods);
2520 GNUNET_free (api); 2520 GNUNET_free (api);
2521 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2521 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
2522 "OpenID Connect REST plugin is finished\n"); 2522 "OpenID Connect REST plugin is finished\n");
diff --git a/src/reclaim/plugin_rest_reclaim.c b/src/reclaim/plugin_rest_reclaim.c
index 863dd0450..654df175e 100644
--- a/src/reclaim/plugin_rest_reclaim.c
+++ b/src/reclaim/plugin_rest_reclaim.c
@@ -1492,7 +1492,7 @@ libgnunet_plugin_rest_reclaim_done (void *cls)
1492 1492
1493 plugin->cfg = NULL; 1493 plugin->cfg = NULL;
1494 1494
1495 GNUNET_free_non_null (allow_methods); 1495 GNUNET_free (allow_methods);
1496 GNUNET_free (api); 1496 GNUNET_free (api);
1497 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 1497 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
1498 "Identity Provider REST plugin is finished\n"); 1498 "Identity Provider REST plugin is finished\n");
diff --git a/src/reclaim/reclaim_api.c b/src/reclaim/reclaim_api.c
index cfe137949..ff549fa71 100644
--- a/src/reclaim/reclaim_api.c
+++ b/src/reclaim/reclaim_api.c
@@ -658,7 +658,7 @@ handle_consume_ticket_result (void *cls,
658 } 658 }
659 GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op); 659 GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
660 free_op (op); 660 free_op (op);
661 GNUNET_free_non_null (attrs); 661 GNUNET_free (attrs);
662 return; 662 return;
663 } 663 }
664 GNUNET_assert (0); 664 GNUNET_assert (0);
diff --git a/src/regex/gnunet-regex-profiler.c b/src/regex/gnunet-regex-profiler.c
index 3f8133d61..e82e10e3b 100644
--- a/src/regex/gnunet-regex-profiler.c
+++ b/src/regex/gnunet-regex-profiler.c
@@ -448,9 +448,9 @@ do_shutdown (void *cls)
448 search_str_cnt < num_peers && NULL != search_strings; 448 search_str_cnt < num_peers && NULL != search_strings;
449 search_str_cnt++) 449 search_str_cnt++)
450 { 450 {
451 GNUNET_free_non_null (search_strings[search_str_cnt]); 451 GNUNET_free (search_strings[search_str_cnt]);
452 } 452 }
453 GNUNET_free_non_null (search_strings); 453 GNUNET_free (search_strings);
454 search_strings = NULL; 454 search_strings = NULL;
455 455
456 if (NULL != reg_handle) 456 if (NULL != reg_handle)
diff --git a/src/regex/gnunet-regex-simulation-profiler.c b/src/regex/gnunet-regex-simulation-profiler.c
index 9adde99bd..3d449a04e 100644
--- a/src/regex/gnunet-regex-simulation-profiler.c
+++ b/src/regex/gnunet-regex-simulation-profiler.c
@@ -255,7 +255,7 @@ reset_meter (struct ProgressMeter *meter)
255static void 255static void
256free_meter (struct ProgressMeter *meter) 256free_meter (struct ProgressMeter *meter)
257{ 257{
258 GNUNET_free_non_null (meter->startup_string); 258 GNUNET_free (meter->startup_string);
259 GNUNET_free (meter); 259 GNUNET_free (meter);
260} 260}
261 261
diff --git a/src/regex/regex_internal.c b/src/regex/regex_internal.c
index 1dd4f6a97..cd33281e2 100644
--- a/src/regex/regex_internal.c
+++ b/src/regex/regex_internal.c
@@ -168,7 +168,7 @@ state_remove_transition (struct REGEX_INTERNAL_State *state,
168 if (transition->from_state != state) 168 if (transition->from_state != state)
169 return; 169 return;
170 170
171 GNUNET_free_non_null (transition->label); 171 GNUNET_free (transition->label);
172 172
173 state->transition_count--; 173 state->transition_count--;
174 GNUNET_CONTAINER_DLL_remove (state->transitions_head, 174 GNUNET_CONTAINER_DLL_remove (state->transitions_head,
@@ -310,8 +310,8 @@ automaton_destroy_state (struct REGEX_INTERNAL_State *s)
310 if (NULL == s) 310 if (NULL == s)
311 return; 311 return;
312 312
313 GNUNET_free_non_null (s->name); 313 GNUNET_free (s->name);
314 GNUNET_free_non_null (s->proof); 314 GNUNET_free (s->proof);
315 state_set_clear (&s->nfa_set); 315 state_set_clear (&s->nfa_set);
316 for (t = s->transitions_head; NULL != t; t = next_t) 316 for (t = s->transitions_head; NULL != t; t = next_t)
317 { 317 {
@@ -658,7 +658,7 @@ sb_realloc (struct StringBuffer *ret, size_t nlen)
658 ret->blen = nlen; 658 ret->blen = nlen;
659 GNUNET_memcpy (ret->abuf, ret->sbuf, ret->slen); 659 GNUNET_memcpy (ret->abuf, ret->sbuf, ret->slen);
660 ret->sbuf = ret->abuf; 660 ret->sbuf = ret->abuf;
661 GNUNET_free_non_null (old); 661 GNUNET_free (old);
662} 662}
663 663
664 664
@@ -726,7 +726,7 @@ sb_wrap (struct StringBuffer *ret, const char *format, size_t extra_chars)
726 format, 726 format,
727 (int) ret->slen, 727 (int) ret->slen,
728 ret->sbuf); 728 ret->sbuf);
729 GNUNET_free_non_null (ret->abuf); 729 GNUNET_free (ret->abuf);
730 ret->abuf = temp; 730 ret->abuf = temp;
731 ret->sbuf = temp; 731 ret->sbuf = temp;
732 ret->blen = ret->slen + extra_chars + 1; 732 ret->blen = ret->slen + extra_chars + 1;
@@ -1592,8 +1592,8 @@ automaton_create_proofs (struct REGEX_INTERNAL_Automaton *a)
1592 if ((NULL == R_last) || (NULL == R_cur)) 1592 if ((NULL == R_last) || (NULL == R_cur))
1593 { 1593 {
1594 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "malloc"); 1594 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "malloc");
1595 GNUNET_free_non_null (R_cur); 1595 GNUNET_free (R_cur);
1596 GNUNET_free_non_null (R_last); 1596 GNUNET_free (R_last);
1597 return GNUNET_SYSERR; 1597 return GNUNET_SYSERR;
1598 } 1598 }
1599 1599
@@ -2159,7 +2159,7 @@ dfa_add_multi_strides_helper (void *cls,
2159 t->to_state); 2159 t->to_state);
2160 } 2160 }
2161 } 2161 }
2162 GNUNET_free_non_null (label); 2162 GNUNET_free (label);
2163} 2163}
2164 2164
2165 2165
@@ -2213,7 +2213,7 @@ REGEX_INTERNAL_dfa_add_multi_strides (struct REGEX_INTERNAL_Context *regex_ctx,
2213 t_next = t->next; 2213 t_next = t->next;
2214 state_add_transition (regex_ctx, t->from_state, t->label, t->to_state); 2214 state_add_transition (regex_ctx, t->from_state, t->label, t->to_state);
2215 GNUNET_CONTAINER_DLL_remove (ctx.transitions_head, ctx.transitions_tail, t); 2215 GNUNET_CONTAINER_DLL_remove (ctx.transitions_head, ctx.transitions_tail, t);
2216 GNUNET_free_non_null (t->label); 2216 GNUNET_free (t->label);
2217 GNUNET_free (t); 2217 GNUNET_free (t);
2218 } 2218 }
2219 2219
@@ -2361,7 +2361,7 @@ dfa_compress_paths (struct REGEX_INTERNAL_Context *regex_ctx,
2361 t_next = t->next; 2361 t_next = t->next;
2362 state_add_transition (regex_ctx, t->from_state, t->label, t->to_state); 2362 state_add_transition (regex_ctx, t->from_state, t->label, t->to_state);
2363 GNUNET_CONTAINER_DLL_remove (transitions_head, transitions_tail, t); 2363 GNUNET_CONTAINER_DLL_remove (transitions_head, transitions_tail, t);
2364 GNUNET_free_non_null (t->label); 2364 GNUNET_free (t->label);
2365 GNUNET_free (t); 2365 GNUNET_free (t);
2366 } 2366 }
2367 2367
@@ -2972,7 +2972,7 @@ error:
2972 if (NULL != error_msg) 2972 if (NULL != error_msg)
2973 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", error_msg); 2973 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", error_msg);
2974 2974
2975 GNUNET_free_non_null (p); 2975 GNUNET_free (p);
2976 2976
2977 while (NULL != (nfa = ctx.stack_head)) 2977 while (NULL != (nfa = ctx.stack_head))
2978 { 2978 {
@@ -3133,8 +3133,8 @@ REGEX_INTERNAL_automaton_destroy (struct REGEX_INTERNAL_Automaton *a)
3133 if (NULL == a) 3133 if (NULL == a)
3134 return; 3134 return;
3135 3135
3136 GNUNET_free_non_null (a->regex); 3136 GNUNET_free (a->regex);
3137 GNUNET_free_non_null (a->canonical_regex); 3137 GNUNET_free (a->canonical_regex);
3138 3138
3139 for (s = a->states_head; NULL != s; s = next_state) 3139 for (s = a->states_head; NULL != s; s = next_state)
3140 { 3140 {
diff --git a/src/regex/regex_test_lib.c b/src/regex/regex_test_lib.c
index 05001b5d2..58cd8dc10 100644
--- a/src/regex/regex_test_lib.c
+++ b/src/regex/regex_test_lib.c
@@ -222,10 +222,10 @@ regex_combine (struct RegexCombineCtx *ctx)
222 else 222 else
223 { 223 {
224 GNUNET_asprintf (&tmp, "%s%s|", regex, s); 224 GNUNET_asprintf (&tmp, "%s%s|", regex, s);
225 GNUNET_free_non_null (regex); 225 GNUNET_free (regex);
226 regex = tmp; 226 regex = tmp;
227 } 227 }
228 GNUNET_free_non_null (s); 228 GNUNET_free (s);
229 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " so far '%s' for inner %s\n", regex, 229 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " so far '%s' for inner %s\n", regex,
230 ctx->s); 230 ctx->s);
231 } 231 }
@@ -517,7 +517,7 @@ regex_ctx_destroy (struct RegexCombineCtx *ctx)
517 { 517 {
518 regex_ctx_destroy (ctx->children[i]); 518 regex_ctx_destroy (ctx->children[i]);
519 } 519 }
520 GNUNET_free_non_null (ctx->s); /* 's' on root node is null */ 520 GNUNET_free (ctx->s); /* 's' on root node is null */
521 GNUNET_free (ctx->children); 521 GNUNET_free (ctx->children);
522 GNUNET_free (ctx); 522 GNUNET_free (ctx);
523} 523}
@@ -632,7 +632,7 @@ REGEX_TEST_read_from_file (const char *filename)
632 regex = NULL; 632 regex = NULL;
633 } 633 }
634 while (offset < size); 634 while (offset < size);
635 GNUNET_free_non_null (regex); 635 GNUNET_free (regex);
636 GNUNET_free (buffer); 636 GNUNET_free (buffer);
637 637
638 return regexes; 638 return regexes;
diff --git a/src/regex/test_regex_eval_api.c b/src/regex/test_regex_eval_api.c
index 767571156..7cd081269 100644
--- a/src/regex/test_regex_eval_api.c
+++ b/src/regex/test_regex_eval_api.c
@@ -178,9 +178,9 @@ test_random (unsigned int rx_length, unsigned int max_str_len,
178 return result; 178 return result;
179 179
180error: 180error:
181 GNUNET_free_non_null (matching_str); 181 GNUNET_free (matching_str);
182 GNUNET_free_non_null (rand_rx); 182 GNUNET_free (rand_rx);
183 GNUNET_free_non_null (canonical_regex); 183 GNUNET_free (canonical_regex);
184 return -1; 184 return -1;
185} 185}
186 186
@@ -371,7 +371,7 @@ main (int argc, char *argv[])
371 REGEX_INTERNAL_automaton_destroy (a); 371 REGEX_INTERNAL_automaton_destroy (a);
372 if (0 != check_dfa) 372 if (0 != check_dfa)
373 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "check_proof: %s\n", check_proof); 373 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "check_proof: %s\n", check_proof);
374 GNUNET_free_non_null (check_proof); 374 GNUNET_free (check_proof);
375 375
376 regfree (&rx); 376 regfree (&rx);
377 } 377 }
diff --git a/src/rest/gnunet-rest-server.c b/src/rest/gnunet-rest-server.c
index 30eade623..875509536 100644
--- a/src/rest/gnunet-rest-server.c
+++ b/src/rest/gnunet-rest-server.c
@@ -209,7 +209,7 @@ plugin_callback (void *cls, struct MHD_Response *resp, int status)
209static int 209static int
210cleanup_url_map (void *cls, const struct GNUNET_HashCode *key, void *value) 210cleanup_url_map (void *cls, const struct GNUNET_HashCode *key, void *value)
211{ 211{
212 GNUNET_free_non_null (value); 212 GNUNET_free (value);
213 return GNUNET_YES; 213 return GNUNET_YES;
214} 214}
215 215
@@ -728,8 +728,8 @@ do_shutdown (void *cls)
728{ 728{
729 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n"); 729 GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n");
730 kill_httpd (); 730 kill_httpd ();
731 GNUNET_free_non_null (allow_credentials); 731 GNUNET_free (allow_credentials);
732 GNUNET_free_non_null (allow_headers); 732 GNUNET_free (allow_headers);
733} 733}
734 734
735 735
@@ -1055,7 +1055,7 @@ main (int argc, char *const *argv)
1055 ? 0 1055 ? 0
1056 : 1; 1056 : 1;
1057 MHD_destroy_response (failure_response); 1057 MHD_destroy_response (failure_response);
1058 GNUNET_free_non_null ((char *) argv); 1058 GNUNET_free_nz ((char *) argv);
1059 return ret; 1059 return ret;
1060} 1060}
1061 1061
diff --git a/src/rps/rps_api.c b/src/rps/rps_api.c
index da24ca4c9..8b69dae96 100644
--- a/src/rps/rps_api.c
+++ b/src/rps/rps_api.c
@@ -674,7 +674,7 @@ handle_stream_input (void *cls,
674 // peers = (struct GNUNET_PeerIdentity *) &msg[1]; 674 // peers = (struct GNUNET_PeerIdentity *) &msg[1];
675 num_peers = ntohl (msg->num_peers); 675 num_peers = ntohl (msg->num_peers);
676 srh_callback_num_peers = num_peers; 676 srh_callback_num_peers = num_peers;
677 GNUNET_free_non_null (srh_callback_peers); 677 GNUNET_free (srh_callback_peers);
678 srh_callback_peers = GNUNET_new_array (num_peers, 678 srh_callback_peers = GNUNET_new_array (num_peers,
679 struct GNUNET_PeerIdentity); 679 struct GNUNET_PeerIdentity);
680 GNUNET_memcpy (srh_callback_peers, 680 GNUNET_memcpy (srh_callback_peers,
diff --git a/src/set/gnunet-service-set.c b/src/set/gnunet-service-set.c
index 8b46f68de..2b859d81a 100644
--- a/src/set/gnunet-service-set.c
+++ b/src/set/gnunet-service-set.c
@@ -492,7 +492,7 @@ destroy_elements_iterator (void *cls,
492{ 492{
493 struct ElementEntry *ee = value; 493 struct ElementEntry *ee = value;
494 494
495 GNUNET_free_non_null (ee->mutations); 495 GNUNET_free (ee->mutations);
496 GNUNET_free (ee); 496 GNUNET_free (ee);
497 return GNUNET_YES; 497 return GNUNET_YES;
498} 498}
@@ -570,7 +570,7 @@ client_disconnect_cb (void *cls,
570 content->elements = NULL; 570 content->elements = NULL;
571 GNUNET_free (content); 571 GNUNET_free (content);
572 } 572 }
573 GNUNET_free_non_null (set->excluded_generations); 573 GNUNET_free (set->excluded_generations);
574 set->excluded_generations = NULL; 574 set->excluded_generations = NULL;
575 575
576 /* remove set from pending copy requests */ 576 /* remove set from pending copy requests */
diff --git a/src/set/gnunet-service-set_union_strata_estimator.c b/src/set/gnunet-service-set_union_strata_estimator.c
index a59dbbd57..1101a56a6 100644
--- a/src/set/gnunet-service-set_union_strata_estimator.c
+++ b/src/set/gnunet-service-set_union_strata_estimator.c
@@ -120,7 +120,7 @@ strata_estimator_read (const void *buf,
120 if (buf_len != se->strata_count * se->ibf_size * IBF_BUCKET_SIZE) 120 if (buf_len != se->strata_count * se->ibf_size * IBF_BUCKET_SIZE)
121 { 121 {
122 GNUNET_break (0); /* very odd error */ 122 GNUNET_break (0); /* very odd error */
123 GNUNET_free_non_null (dbuf); 123 GNUNET_free (dbuf);
124 return GNUNET_SYSERR; 124 return GNUNET_SYSERR;
125 } 125 }
126 126
@@ -129,7 +129,7 @@ strata_estimator_read (const void *buf,
129 ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]); 129 ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]);
130 buf += se->ibf_size * IBF_BUCKET_SIZE; 130 buf += se->ibf_size * IBF_BUCKET_SIZE;
131 } 131 }
132 GNUNET_free_non_null (dbuf); 132 GNUNET_free (dbuf);
133 return GNUNET_OK; 133 return GNUNET_OK;
134} 134}
135 135
diff --git a/src/statistics/gnunet-service-statistics.c b/src/statistics/gnunet-service-statistics.c
index d40f74aaf..be2a49201 100644
--- a/src/statistics/gnunet-service-statistics.c
+++ b/src/statistics/gnunet-service-statistics.c
@@ -319,7 +319,7 @@ save ()
319 total, 319 total,
320 fn); 320 fn);
321 } 321 }
322 GNUNET_free_non_null (fn); 322 GNUNET_free (fn);
323} 323}
324 324
325 325
diff --git a/src/statistics/gnunet-statistics.c b/src/statistics/gnunet-statistics.c
index 63afde877..b9aedb4e7 100644
--- a/src/statistics/gnunet-statistics.c
+++ b/src/statistics/gnunet-statistics.c
@@ -880,7 +880,7 @@ main (int argc, char *const *argv)
880 GNUNET_array_grow (nodes, 880 GNUNET_array_grow (nodes,
881 num_nodes, 881 num_nodes,
882 0); 882 0);
883 GNUNET_free_non_null (remote_host); 883 GNUNET_free (remote_host);
884 GNUNET_free_nz ((void *) argv); 884 GNUNET_free_nz ((void *) argv);
885 return ret; 885 return ret;
886} 886}
diff --git a/src/statistics/statistics_api.c b/src/statistics/statistics_api.c
index 869d51544..12c09b7d2 100644
--- a/src/statistics/statistics_api.c
+++ b/src/statistics/statistics_api.c
@@ -374,8 +374,8 @@ schedule_watch_request (struct GNUNET_STATISTICS_Handle *h,
374static void 374static void
375free_action_item (struct GNUNET_STATISTICS_GetHandle *gh) 375free_action_item (struct GNUNET_STATISTICS_GetHandle *gh)
376{ 376{
377 GNUNET_free_non_null (gh->subsystem); 377 GNUNET_free (gh->subsystem);
378 GNUNET_free_non_null (gh->name); 378 GNUNET_free (gh->name);
379 GNUNET_free (gh); 379 GNUNET_free (gh);
380} 380}
381 381
diff --git a/src/testbed-logger/test_testbed_logger_api.c b/src/testbed-logger/test_testbed_logger_api.c
index 7496184c0..085f83d0e 100644
--- a/src/testbed-logger/test_testbed_logger_api.c
+++ b/src/testbed-logger/test_testbed_logger_api.c
@@ -88,7 +88,7 @@ shutdown_now ()
88{ 88{
89 CANCEL_TASK (abort_task); 89 CANCEL_TASK (abort_task);
90 CANCEL_TASK (write_task); 90 CANCEL_TASK (write_task);
91 GNUNET_free_non_null (search_dir); 91 GNUNET_free (search_dir);
92 if (NULL != h) 92 if (NULL != h)
93 GNUNET_TESTBED_LOGGER_disconnect (h); 93 GNUNET_TESTBED_LOGGER_disconnect (h);
94 GNUNET_SCHEDULER_shutdown (); 94 GNUNET_SCHEDULER_shutdown ();
diff --git a/src/testbed/gnunet-helper-testbed.c b/src/testbed/gnunet-helper-testbed.c
index 4c1637db6..24c212d6b 100644
--- a/src/testbed/gnunet-helper-testbed.c
+++ b/src/testbed/gnunet-helper-testbed.c
@@ -405,7 +405,7 @@ tokenizer_cb (void *cls, const struct GNUNET_MessageHeader *message)
405 GNUNET_free (evstr); 405 GNUNET_free (evstr);
406 evstr = NULL; 406 evstr = NULL;
407 } 407 }
408 GNUNET_free_non_null (hostname); 408 GNUNET_free (hostname);
409 hostname = NULL; 409 hostname = NULL;
410 GNUNET_assert (NULL != test_system); 410 GNUNET_assert (NULL != test_system);
411 GNUNET_assert (GNUNET_OK == 411 GNUNET_assert (GNUNET_OK ==
diff --git a/src/testbed/gnunet-service-testbed.c b/src/testbed/gnunet-service-testbed.c
index 21a9d0a51..3ef99ae25 100644
--- a/src/testbed/gnunet-service-testbed.c
+++ b/src/testbed/gnunet-service-testbed.c
@@ -550,8 +550,8 @@ handle_add_host (void *cls,
550 GNUNET_strlcpy (hostname, ptr, hostname_length + 1); 550 GNUNET_strlcpy (hostname, ptr, hostname_length + 1);
551 if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header))) 551 if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header)))
552 { 552 {
553 GNUNET_free_non_null (username); 553 GNUNET_free (username);
554 GNUNET_free_non_null (hostname); 554 GNUNET_free (hostname);
555 GNUNET_break_op (0); 555 GNUNET_break_op (0);
556 GNUNET_SERVICE_client_drop (client); 556 GNUNET_SERVICE_client_drop (client);
557 return; 557 return;
@@ -570,7 +570,7 @@ handle_add_host (void *cls,
570 username, 570 username,
571 host_cfg, 571 host_cfg,
572 ntohs (msg->ssh_port)); 572 ntohs (msg->ssh_port));
573 GNUNET_free_non_null (username); 573 GNUNET_free (username);
574 GNUNET_free (hostname); 574 GNUNET_free (hostname);
575 GNUNET_CONFIGURATION_destroy (host_cfg); 575 GNUNET_CONFIGURATION_destroy (host_cfg);
576 if (NULL == host) 576 if (NULL == host)
@@ -757,17 +757,17 @@ shutdown_task (void *cls)
757 for (id = 0; id < GST_host_list_size; id++) 757 for (id = 0; id < GST_host_list_size; id++)
758 if (NULL != GST_host_list[id]) 758 if (NULL != GST_host_list[id])
759 GNUNET_TESTBED_host_destroy (GST_host_list[id]); 759 GNUNET_TESTBED_host_destroy (GST_host_list[id]);
760 GNUNET_free_non_null (GST_host_list); 760 GNUNET_free (GST_host_list);
761 if (NULL != GST_context) 761 if (NULL != GST_context)
762 { 762 {
763 GNUNET_free_non_null (GST_context->master_ip); 763 GNUNET_free (GST_context->master_ip);
764 if (NULL != GST_context->system) 764 if (NULL != GST_context->system)
765 GNUNET_TESTING_system_destroy (GST_context->system, 765 GNUNET_TESTING_system_destroy (GST_context->system,
766 GNUNET_YES); 766 GNUNET_YES);
767 GNUNET_free (GST_context); 767 GNUNET_free (GST_context);
768 GST_context = NULL; 768 GST_context = NULL;
769 } 769 }
770 GNUNET_free_non_null (hostname); 770 GNUNET_free (hostname);
771 /* Free hello cache */ 771 /* Free hello cache */
772 GST_cache_clear (); 772 GST_cache_clear ();
773 GST_connection_pool_destroy (); 773 GST_connection_pool_destroy ();
diff --git a/src/testbed/gnunet-service-testbed_cache.c b/src/testbed/gnunet-service-testbed_cache.c
index f87f39067..5e74b865a 100644
--- a/src/testbed/gnunet-service-testbed_cache.c
+++ b/src/testbed/gnunet-service-testbed_cache.c
@@ -120,7 +120,7 @@ static void
120free_entry (struct CacheEntry *entry) 120free_entry (struct CacheEntry *entry)
121{ 121{
122 GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry); 122 GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry);
123 GNUNET_free_non_null (entry->hello); 123 GNUNET_free (entry->hello);
124 GNUNET_free (entry); 124 GNUNET_free (entry);
125} 125}
126 126
@@ -261,7 +261,7 @@ GST_cache_add_hello (const unsigned int peer_id,
261 entry = cache_lookup (peer_id); 261 entry = cache_lookup (peer_id);
262 if (NULL == entry) 262 if (NULL == entry)
263 entry = add_entry (peer_id); 263 entry = add_entry (peer_id);
264 GNUNET_free_non_null (entry->hello); 264 GNUNET_free (entry->hello);
265 entry->hello = GNUNET_copy_message (hello); 265 entry->hello = GNUNET_copy_message (hello);
266} 266}
267 267
diff --git a/src/testbed/gnunet-service-testbed_connectionpool.c b/src/testbed/gnunet-service-testbed_connectionpool.c
index 7f9c9fd57..7318971b3 100644
--- a/src/testbed/gnunet-service-testbed_connectionpool.c
+++ b/src/testbed/gnunet-service-testbed_connectionpool.c
@@ -687,7 +687,7 @@ oprelease_get_handle_core (void *cls)
687 return; 687 return;
688 GNUNET_CORE_disconnect (entry->handle_core); 688 GNUNET_CORE_disconnect (entry->handle_core);
689 entry->handle_core = NULL; 689 entry->handle_core = NULL;
690 GNUNET_free_non_null (entry->peer_identity); 690 GNUNET_free (entry->peer_identity);
691 entry->peer_identity = NULL; 691 entry->peer_identity = NULL;
692} 692}
693 693
diff --git a/src/testbed/gnunet-service-testbed_cpustatus.c b/src/testbed/gnunet-service-testbed_cpustatus.c
index 2d490ba8c..70b865c73 100644
--- a/src/testbed/gnunet-service-testbed_cpustatus.c
+++ b/src/testbed/gnunet-service-testbed_cpustatus.c
@@ -649,7 +649,7 @@ GST_stats_destroy ()
649 proc_stat = NULL; 649 proc_stat = NULL;
650 } 650 }
651#elif OSX 651#elif OSX
652 GNUNET_free_non_null (prev_cpu_load); 652 GNUNET_free (prev_cpu_load);
653#endif 653#endif
654 if (NULL != sample_load_task_id) 654 if (NULL != sample_load_task_id)
655 { 655 {
diff --git a/src/testbed/gnunet-service-testbed_links.c b/src/testbed/gnunet-service-testbed_links.c
index ee00e4be0..fb25d7bcb 100644
--- a/src/testbed/gnunet-service-testbed_links.c
+++ b/src/testbed/gnunet-service-testbed_links.c
@@ -401,7 +401,7 @@ GST_route_list_clear ()
401 for (id = 0; id < route_list_size; id++) 401 for (id = 0; id < route_list_size; id++)
402 if (NULL != route_list[id]) 402 if (NULL != route_list[id])
403 GNUNET_free (route_list[id]); 403 GNUNET_free (route_list[id]);
404 GNUNET_free_non_null (route_list); 404 GNUNET_free (route_list);
405 route_list = NULL; 405 route_list = NULL;
406} 406}
407 407
@@ -508,7 +508,7 @@ GST_slave_list_clear ()
508 continue; 508 continue;
509 destroy_slave (slave); 509 destroy_slave (slave);
510 } 510 }
511 GNUNET_free_non_null (GST_slave_list); 511 GNUNET_free (GST_slave_list);
512 GST_slave_list = NULL; 512 GST_slave_list = NULL;
513} 513}
514 514
@@ -1104,7 +1104,7 @@ GST_neighbour_list_clean ()
1104 GNUNET_free (n); 1104 GNUNET_free (n);
1105 neighbour_list[id] = NULL; 1105 neighbour_list[id] = NULL;
1106 } 1106 }
1107 GNUNET_free_non_null (neighbour_list); 1107 GNUNET_free (neighbour_list);
1108} 1108}
1109 1109
1110 1110
diff --git a/src/testbed/gnunet-service-testbed_oc.c b/src/testbed/gnunet-service-testbed_oc.c
index 262fcfc00..3d13ac8cc 100644
--- a/src/testbed/gnunet-service-testbed_oc.c
+++ b/src/testbed/gnunet-service-testbed_oc.c
@@ -360,7 +360,7 @@ GST_cleanup_focc (struct ForwardedOverlayConnectContext *focc)
360 GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head, 360 GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head,
361 rhc->focc_dll_tail, 361 rhc->focc_dll_tail,
362 focc); 362 focc);
363 GNUNET_free_non_null (focc->orig_msg); 363 GNUNET_free (focc->orig_msg);
364 GNUNET_free (focc); 364 GNUNET_free (focc);
365} 365}
366 366
@@ -536,8 +536,8 @@ cleanup_occ (struct OverlayConnectContext *occ)
536 536
537 LOG_DEBUG ("0x%llx: Cleaning up occ\n", 537 LOG_DEBUG ("0x%llx: Cleaning up occ\n",
538 occ->op_id); 538 occ->op_id);
539 GNUNET_free_non_null (occ->emsg); 539 GNUNET_free (occ->emsg);
540 GNUNET_free_non_null (occ->hello); 540 GNUNET_free (occ->hello);
541 if (NULL != occ->send_hello_task) 541 if (NULL != occ->send_hello_task)
542 GNUNET_SCHEDULER_cancel (occ->send_hello_task); 542 GNUNET_SCHEDULER_cancel (occ->send_hello_task);
543 if (NULL != occ->cleanup_task) 543 if (NULL != occ->cleanup_task)
@@ -727,7 +727,7 @@ overlay_connect_notify (void *cls,
727 cleanup_occ_rp2c (&occ->p2ctx.remote); 727 cleanup_occ_rp2c (&occ->p2ctx.remote);
728 break; 728 break;
729 } 729 }
730 GNUNET_free_non_null (occ->emsg); 730 GNUNET_free (occ->emsg);
731 occ->emsg = NULL; 731 occ->emsg = NULL;
732 send_overlay_connect_success_msg (occ); 732 send_overlay_connect_success_msg (occ);
733 occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ, 733 occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ,
@@ -758,7 +758,7 @@ occ_cache_get_handle_ats_occ_cb (void *cls,
758 758
759 GNUNET_assert (OCC_TYPE_LOCAL == occ->type); 759 GNUNET_assert (OCC_TYPE_LOCAL == occ->type);
760 GNUNET_assert (NULL != occ->timeout_task); 760 GNUNET_assert (NULL != occ->timeout_task);
761 GNUNET_free_non_null (occ->emsg); 761 GNUNET_free (occ->emsg);
762 if (NULL == ac) 762 if (NULL == ac)
763 { 763 {
764 GNUNET_asprintf (&occ->emsg, 764 GNUNET_asprintf (&occ->emsg,
@@ -842,7 +842,7 @@ occ_hello_sent_cb (void *cls)
842 lp2c->ohh = NULL; 842 lp2c->ohh = NULL;
843 843
844 GNUNET_assert (NULL == occ->send_hello_task); 844 GNUNET_assert (NULL == occ->send_hello_task);
845 GNUNET_free_non_null (occ->emsg); 845 GNUNET_free (occ->emsg);
846 846
847 GNUNET_asprintf (&occ->emsg, 847 GNUNET_asprintf (&occ->emsg,
848 "0x%llx: Timeout while acquiring ATS of %s from cache", 848 "0x%llx: Timeout while acquiring ATS of %s from cache",
@@ -1092,7 +1092,7 @@ hello_update_cb (void *cls,
1092 GST_connection_pool_get_handle_done (occ->cgh_p1th); 1092 GST_connection_pool_get_handle_done (occ->cgh_p1th);
1093 occ->cgh_p1th = NULL; 1093 occ->cgh_p1th = NULL;
1094 occ->p1th_ = NULL; 1094 occ->p1th_ = NULL;
1095 GNUNET_free_non_null (occ->emsg); 1095 GNUNET_free (occ->emsg);
1096 occ->emsg = NULL; 1096 occ->emsg = NULL;
1097 p2_transport_connect (occ); 1097 p2_transport_connect (occ);
1098} 1098}
@@ -1118,7 +1118,7 @@ p1_transport_connect_cache_callback (void *cls,
1118{ 1118{
1119 struct OverlayConnectContext *occ = cls; 1119 struct OverlayConnectContext *occ = cls;
1120 1120
1121 GNUNET_free_non_null (occ->emsg); 1121 GNUNET_free (occ->emsg);
1122 occ->emsg = NULL; 1122 occ->emsg = NULL;
1123 if (NULL == th) 1123 if (NULL == th)
1124 { 1124 {
@@ -1166,7 +1166,7 @@ occ_cache_get_handle_core_cb (void *cls,
1166 const struct GNUNET_MessageHeader *hello; 1166 const struct GNUNET_MessageHeader *hello;
1167 1167
1168 GNUNET_assert (NULL != occ->timeout_task); 1168 GNUNET_assert (NULL != occ->timeout_task);
1169 GNUNET_free_non_null (occ->emsg); 1169 GNUNET_free (occ->emsg);
1170 if ((NULL == ch) || (NULL == my_identity)) 1170 if ((NULL == ch) || (NULL == my_identity))
1171 { 1171 {
1172 GNUNET_asprintf (&occ->emsg, 1172 GNUNET_asprintf (&occ->emsg,
@@ -1249,7 +1249,7 @@ overlay_connect_get_config (void *cls,
1249 cmsg = 1249 cmsg =
1250 (const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg; 1250 (const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg;
1251 occ->other_peer_identity = cmsg->peer_identity; 1251 occ->other_peer_identity = cmsg->peer_identity;
1252 GNUNET_free_non_null (occ->emsg); 1252 GNUNET_free (occ->emsg);
1253 GNUNET_asprintf (&occ->emsg, 1253 GNUNET_asprintf (&occ->emsg,
1254 "0x%llx: Timeout while connecting to CORE of peer with " 1254 "0x%llx: Timeout while connecting to CORE of peer with "
1255 "id: %u", 1255 "id: %u",
@@ -1508,7 +1508,7 @@ p2_controller_connect_cb (void *cls,
1508 &cmsg.header, 1508 &cmsg.header,
1509 &overlay_connect_get_config, 1509 &overlay_connect_get_config,
1510 occ); 1510 occ);
1511 GNUNET_free_non_null (occ->emsg); 1511 GNUNET_free (occ->emsg);
1512 GNUNET_asprintf (&occ->emsg, 1512 GNUNET_asprintf (&occ->emsg,
1513 "0x%llx: Timeout while getting peer identity of peer " 1513 "0x%llx: Timeout while getting peer identity of peer "
1514 "with id: %u", 1514 "with id: %u",
@@ -1674,7 +1674,7 @@ cleanup_rocc (struct RemoteOverlayConnectCtx *rocc)
1674 if ((GNUNET_YES == rocc->peer->destroy_flag) && 1674 if ((GNUNET_YES == rocc->peer->destroy_flag) &&
1675 (0 == rocc->peer->reference_cnt)) 1675 (0 == rocc->peer->reference_cnt))
1676 GST_destroy_peer (rocc->peer); 1676 GST_destroy_peer (rocc->peer);
1677 GNUNET_free_non_null (rocc->hello); 1677 GNUNET_free (rocc->hello);
1678 GNUNET_CONTAINER_DLL_remove (roccq_head, 1678 GNUNET_CONTAINER_DLL_remove (roccq_head,
1679 roccq_tail, 1679 roccq_tail,
1680 rocc); 1680 rocc);
diff --git a/src/testbed/gnunet-service-testbed_peers.c b/src/testbed/gnunet-service-testbed_peers.c
index d3d597d4f..0184635fa 100644
--- a/src/testbed/gnunet-service-testbed_peers.c
+++ b/src/testbed/gnunet-service-testbed_peers.c
@@ -1084,7 +1084,7 @@ handle_peer_reconfigure (void *cls,
1084 GST_send_operation_success_msg (client, 1084 GST_send_operation_success_msg (client,
1085 op_id); 1085 op_id);
1086 GNUNET_SERVICE_client_continue (client); 1086 GNUNET_SERVICE_client_continue (client);
1087 GNUNET_free_non_null (emsg); 1087 GNUNET_free (emsg);
1088 return; 1088 return;
1089 } 1089 }
1090 prc = GNUNET_new (struct PeerReconfigureContext); 1090 prc = GNUNET_new (struct PeerReconfigureContext);
@@ -1264,7 +1264,7 @@ ret:
1264 else 1264 else
1265 GST_send_operation_success_msg (mctx->client, 1265 GST_send_operation_success_msg (mctx->client,
1266 mctx->op_id); 1266 mctx->op_id);
1267 GNUNET_free_non_null (emsg); 1267 GNUNET_free (emsg);
1268 cleanup_mctx (mctx); 1268 cleanup_mctx (mctx);
1269} 1269}
1270 1270
@@ -1459,7 +1459,7 @@ GST_destroy_peers ()
1459 } 1459 }
1460 GNUNET_free (peer); 1460 GNUNET_free (peer);
1461 } 1461 }
1462 GNUNET_free_non_null (GST_peer_list); 1462 GNUNET_free (GST_peer_list);
1463 GST_peer_list = NULL; 1463 GST_peer_list = NULL;
1464 GST_peer_list_size = 0; 1464 GST_peer_list_size = 0;
1465} 1465}
diff --git a/src/testbed/gnunet_testbed_mpi_spawn.c b/src/testbed/gnunet_testbed_mpi_spawn.c
index 8b67523a1..353cc2881 100644
--- a/src/testbed/gnunet_testbed_mpi_spawn.c
+++ b/src/testbed/gnunet_testbed_mpi_spawn.c
@@ -321,7 +321,7 @@ main (int argc, char *argv[])
321 GNUNET_SIGNAL_handler_uninstall (shc_chld); 321 GNUNET_SIGNAL_handler_uninstall (shc_chld);
322 shc_chld = NULL; 322 shc_chld = NULL;
323 GNUNET_DISK_pipe_close (sigpipe); 323 GNUNET_DISK_pipe_close (sigpipe);
324 GNUNET_free_non_null (fn); 324 GNUNET_free (fn);
325 if (GNUNET_OK != ret) 325 if (GNUNET_OK != ret)
326 return ret; 326 return ret;
327 return 0; 327 return 0;
diff --git a/src/testbed/test_gnunet_helper_testbed.c b/src/testbed/test_gnunet_helper_testbed.c
index 7c4d4bad5..d4eec0269 100644
--- a/src/testbed/test_gnunet_helper_testbed.c
+++ b/src/testbed/test_gnunet_helper_testbed.c
@@ -88,7 +88,7 @@ do_shutdown (void *cls)
88 GNUNET_SCHEDULER_cancel (abort_task); 88 GNUNET_SCHEDULER_cancel (abort_task);
89 if (NULL != helper) 89 if (NULL != helper)
90 GNUNET_HELPER_stop (helper, GNUNET_NO); 90 GNUNET_HELPER_stop (helper, GNUNET_NO);
91 GNUNET_free_non_null (msg); 91 GNUNET_free (msg);
92 if (NULL != cfg) 92 if (NULL != cfg)
93 GNUNET_CONFIGURATION_destroy (cfg); 93 GNUNET_CONFIGURATION_destroy (cfg);
94} 94}
diff --git a/src/testbed/test_testbed_api_statistics.c b/src/testbed/test_testbed_api_statistics.c
index 2d0e2d6b8..dc305d008 100644
--- a/src/testbed/test_testbed_api_statistics.c
+++ b/src/testbed/test_testbed_api_statistics.c
@@ -198,7 +198,7 @@ main (int argc, char **argv)
198 NUM_PEERS, 198 NUM_PEERS,
199 1LL, NULL, NULL, 199 1LL, NULL, NULL,
200 &test_master, NULL); 200 &test_master, NULL);
201 GNUNET_free_non_null (seen_peers); 201 GNUNET_free (seen_peers);
202 if (GNUNET_OK != result) 202 if (GNUNET_OK != result)
203 return 1; 203 return 1;
204 return 0; 204 return 0;
diff --git a/src/testbed/testbed_api.c b/src/testbed/testbed_api.c
index 9fe5bccdc..697783d96 100644
--- a/src/testbed/testbed_api.c
+++ b/src/testbed/testbed_api.c
@@ -1178,7 +1178,7 @@ handle_link_controllers_result (
1178 LOG_DEBUG ("Not calling callback\n"); 1178 LOG_DEBUG ("Not calling callback\n");
1179 if (NULL != cfg) 1179 if (NULL != cfg)
1180 GNUNET_CONFIGURATION_destroy (cfg); 1180 GNUNET_CONFIGURATION_destroy (cfg);
1181 GNUNET_free_non_null (emsg); 1181 GNUNET_free (emsg);
1182} 1182}
1183 1183
1184 1184
@@ -1314,7 +1314,7 @@ handle_barrier_status (void *cls,
1314 return; /* just initialised; skip cleanup */ 1314 return; /* just initialised; skip cleanup */
1315 1315
1316cleanup: 1316cleanup:
1317 GNUNET_free_non_null (emsg); 1317 GNUNET_free (emsg);
1318 /** 1318 /**
1319 * Do not remove the barrier if we did not echo the status back; this is 1319 * Do not remove the barrier if we did not echo the status back; this is
1320 * required at the chained testbed controller setup to ensure the only the 1320 * required at the chained testbed controller setup to ensure the only the
@@ -1459,7 +1459,7 @@ oprelease_link_controllers (void *cls)
1459 case OPC_STATE_FINISHED: 1459 case OPC_STATE_FINISHED:
1460 break; 1460 break;
1461 } 1461 }
1462 GNUNET_free_non_null (data); 1462 GNUNET_free (data);
1463 GNUNET_free (opc); 1463 GNUNET_free (opc);
1464} 1464}
1465 1465
diff --git a/src/testbed/testbed_api_hosts.c b/src/testbed/testbed_api_hosts.c
index 95463e44d..f7352250d 100644
--- a/src/testbed/testbed_api_hosts.c
+++ b/src/testbed/testbed_api_hosts.c
@@ -506,7 +506,7 @@ GNUNET_TESTBED_hosts_load_from_file (
506 else 506 else
507 (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port); 507 (void) GNUNET_TESTBED_host_create (hostname, username, cfg, port);
508 count++; 508 count++;
509 GNUNET_free_non_null (username); 509 GNUNET_free (username);
510 GNUNET_free (hostname); 510 GNUNET_free (hostname);
511 buf = &data[offset + 1]; 511 buf = &data[offset + 1];
512 } 512 }
@@ -611,26 +611,27 @@ GNUNET_TESTBED_hosts_load_from_loadleveler (
611void 611void
612GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host) 612GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host)
613{ 613{
614 struct RegisteredController *rc;
615 uint32_t id;
616
617 GNUNET_assert (host->id < host_list_size); 614 GNUNET_assert (host->id < host_list_size);
618 GNUNET_assert (host_list[host->id] == host); 615 GNUNET_assert (host_list[host->id] == host);
619 host_list[host->id] = NULL; 616 host_list[host->id] = NULL;
620 /* clear registered controllers list */ 617 /* clear registered controllers list */
621 for (rc = host->rc_head; NULL != rc; rc = host->rc_head) 618 for (struct RegisteredController *rc = host->rc_head;
619 NULL != rc;
620 rc = host->rc_head)
622 { 621 {
623 GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc); 622 GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc);
624 GNUNET_free (rc); 623 GNUNET_free (rc);
625 } 624 }
626 GNUNET_free_non_null ((char *) host->username); 625 GNUNET_free_nz ((char *) host->username);
627 GNUNET_free_non_null ((char *) host->hostname); 626 GNUNET_free_nz ((char *) host->hostname);
628 GNUNET_TESTBED_operation_queue_destroy_ ( 627 GNUNET_TESTBED_operation_queue_destroy_ (
629 host->opq_parallel_overlay_connect_operations); 628 host->opq_parallel_overlay_connect_operations);
630 GNUNET_CONFIGURATION_destroy (host->cfg); 629 GNUNET_CONFIGURATION_destroy (host->cfg);
631 GNUNET_free (host); 630 GNUNET_free (host);
632 while (host_list_size >= HOST_LIST_GROW_STEP) 631 while (host_list_size >= HOST_LIST_GROW_STEP)
633 { 632 {
633 uint32_t id;
634
634 for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP; 635 for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP;
635 id--) 636 id--)
636 if (NULL != host_list[id]) 637 if (NULL != host_list[id])
@@ -1223,7 +1224,7 @@ GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc *cproc)
1223 free_argv (cproc->helper_argv); 1224 free_argv (cproc->helper_argv);
1224 cproc->host->controller_started = GNUNET_NO; 1225 cproc->host->controller_started = GNUNET_NO;
1225 cproc->host->locked = GNUNET_NO; 1226 cproc->host->locked = GNUNET_NO;
1226 GNUNET_free_non_null (cproc->msg); 1227 GNUNET_free (cproc->msg);
1227 GNUNET_free (cproc); 1228 GNUNET_free (cproc);
1228} 1229}
1229 1230
diff --git a/src/testbed/testbed_api_operations.c b/src/testbed/testbed_api_operations.c
index a406c0e0b..ae85e0842 100644
--- a/src/testbed/testbed_api_operations.c
+++ b/src/testbed/testbed_api_operations.c
@@ -696,7 +696,7 @@ decide_capacity (struct OperationQueue *opq,
696 } 696 }
697 697
698ret: 698ret:
699 GNUNET_free_non_null (evict_entries); 699 GNUNET_free (evict_entries);
700 if (NULL != ops_) 700 if (NULL != ops_)
701 *ops_ = ops; 701 *ops_ = ops;
702 else 702 else
@@ -771,7 +771,7 @@ check_readiness (struct GNUNET_TESTBED_Operation *op)
771 if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i], 771 if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i],
772 &ops, &n_ops)) 772 &ops, &n_ops))
773 { 773 {
774 GNUNET_free_non_null (evict_ops); 774 GNUNET_free (evict_ops);
775 return GNUNET_NO; 775 return GNUNET_NO;
776 } 776 }
777 if (NULL == ops) 777 if (NULL == ops)
@@ -842,7 +842,7 @@ cleanup_tslots (struct OperationQueue *queue)
842 continue; 842 continue;
843 GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot); 843 GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot);
844 } 844 }
845 GNUNET_free_non_null (fctx->tslots_freeptr); 845 GNUNET_free (fctx->tslots_freeptr);
846 fctx->tslots_freeptr = NULL; 846 fctx->tslots_freeptr = NULL;
847 fctx->alloc_head = NULL; 847 fctx->alloc_head = NULL;
848 fctx->alloc_tail = NULL; 848 fctx->alloc_tail = NULL;
@@ -1337,7 +1337,7 @@ GNUNET_TESTBED_operation_release_ (struct GNUNET_TESTBED_Operation *op)
1337 } 1337 }
1338 GNUNET_free (entry); 1338 GNUNET_free (entry);
1339 } 1339 }
1340 GNUNET_free_non_null (op->qentries); 1340 GNUNET_free (op->qentries);
1341 GNUNET_free (op->queues); 1341 GNUNET_free (op->queues);
1342 GNUNET_free (op->nres); 1342 GNUNET_free (op->nres);
1343 if (NULL != op->release) 1343 if (NULL != op->release)
@@ -1376,7 +1376,7 @@ GNUNET_TESTBED_operations_fini ()
1376 warn = 1; 1376 warn = 1;
1377 queue_destroy (queue); 1377 queue_destroy (queue);
1378 } 1378 }
1379 GNUNET_free_non_null (expired_opqs); 1379 GNUNET_free (expired_opqs);
1380 n_expired_opqs = 0; 1380 n_expired_opqs = 0;
1381 if (warn) 1381 if (warn)
1382 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 1382 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
diff --git a/src/testbed/testbed_api_peers.c b/src/testbed/testbed_api_peers.c
index 7bd895871..99d30e85b 100644
--- a/src/testbed/testbed_api_peers.c
+++ b/src/testbed/testbed_api_peers.c
@@ -952,7 +952,7 @@ oprelease_manage_service (void *cls)
952 case OPC_STATE_FINISHED: 952 case OPC_STATE_FINISHED:
953 break; 953 break;
954 } 954 }
955 GNUNET_free_non_null (data); 955 GNUNET_free (data);
956 GNUNET_free (opc); 956 GNUNET_free (opc);
957} 957}
958 958
diff --git a/src/testbed/testbed_api_statistics.c b/src/testbed/testbed_api_statistics.c
index 4858208cc..7fe47d2a0 100644
--- a/src/testbed/testbed_api_statistics.c
+++ b/src/testbed/testbed_api_statistics.c
@@ -378,8 +378,8 @@ oprelease_get_stats (void *cls)
378 } 378 }
379 GNUNET_free (sc->ops); 379 GNUNET_free (sc->ops);
380 } 380 }
381 GNUNET_free_non_null (sc->subsystem); 381 GNUNET_free (sc->subsystem);
382 GNUNET_free_non_null (sc->name); 382 GNUNET_free (sc->name);
383 GNUNET_free (sc); 383 GNUNET_free (sc);
384 if (GNUNET_YES == 384 if (GNUNET_YES ==
385 GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue)) 385 GNUNET_TESTBED_operation_queue_destroy_empty_ (no_wait_queue))
diff --git a/src/testbed/testbed_api_testbed.c b/src/testbed/testbed_api_testbed.c
index 7be8054ca..7ae30e0c6 100644
--- a/src/testbed/testbed_api_testbed.c
+++ b/src/testbed/testbed_api_testbed.c
@@ -472,11 +472,11 @@ cleanup (struct GNUNET_TESTBED_RunHandle *rc)
472 GNUNET_TESTBED_host_destroy (rc->h); 472 GNUNET_TESTBED_host_destroy (rc->h);
473 for (hid = 0; hid < rc->num_hosts; hid++) 473 for (hid = 0; hid < rc->num_hosts; hid++)
474 GNUNET_TESTBED_host_destroy (rc->hosts[hid]); 474 GNUNET_TESTBED_host_destroy (rc->hosts[hid]);
475 GNUNET_free_non_null (rc->hosts); 475 GNUNET_free (rc->hosts);
476 if (NULL != rc->cfg) 476 if (NULL != rc->cfg)
477 GNUNET_CONFIGURATION_destroy (rc->cfg); 477 GNUNET_CONFIGURATION_destroy (rc->cfg);
478 GNUNET_free_non_null (rc->topo_file); 478 GNUNET_free (rc->topo_file);
479 GNUNET_free_non_null (rc->trusted_ip); 479 GNUNET_free (rc->trusted_ip);
480 GNUNET_free (rc); 480 GNUNET_free (rc);
481} 481}
482 482
@@ -863,7 +863,7 @@ event_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
863 case RC_PEERS_CREATED: 863 case RC_PEERS_CREATED:
864 case RC_READY: 864 case RC_READY:
865 rc->state = RC_PEERS_SHUTDOWN; 865 rc->state = RC_PEERS_SHUTDOWN;
866 GNUNET_free_non_null (rc->peers); 866 GNUNET_free (rc->peers);
867 rc->peers = NULL; 867 rc->peers = NULL;
868 DEBUG ("Peers shut down in %s\n", prof_time (rc)); 868 DEBUG ("Peers shut down in %s\n", prof_time (rc));
869 GNUNET_SCHEDULER_shutdown (); 869 GNUNET_SCHEDULER_shutdown ();
diff --git a/src/testbed/testbed_api_topology.c b/src/testbed/testbed_api_topology.c
index 9ffe7f47d..1d765af92 100644
--- a/src/testbed/testbed_api_topology.c
+++ b/src/testbed/testbed_api_topology.c
@@ -1183,7 +1183,7 @@ _exit:
1183 struct TopologyContextOverlay *overlay; 1183 struct TopologyContextOverlay *overlay;
1184 1184
1185 overlay = &tc->u.overlay; 1185 overlay = &tc->u.overlay;
1186 GNUNET_free_non_null (overlay->link_array); 1186 GNUNET_free (overlay->link_array);
1187 overlay->link_array = NULL; 1187 overlay->link_array = NULL;
1188 } 1188 }
1189 break; 1189 break;
@@ -1193,7 +1193,7 @@ _exit:
1193 struct TopologyContextUnderlay *underlay; 1193 struct TopologyContextUnderlay *underlay;
1194 1194
1195 underlay = &tc->u.underlay; 1195 underlay = &tc->u.underlay;
1196 GNUNET_free_non_null (underlay->link_array); 1196 GNUNET_free (underlay->link_array);
1197 underlay->link_array = NULL; 1197 underlay->link_array = NULL;
1198 } 1198 }
1199 break; 1199 break;
@@ -1428,7 +1428,7 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
1428 default: 1428 default:
1429 GNUNET_break (0); /* Should not use any other option apart from 1429 GNUNET_break (0); /* Should not use any other option apart from
1430 * the ones handled here */ 1430 * the ones handled here */
1431 GNUNET_free_non_null (overlay->link_array); 1431 GNUNET_free (overlay->link_array);
1432 GNUNET_free (tc); 1432 GNUNET_free (tc);
1433 return NULL; 1433 return NULL;
1434 } 1434 }
@@ -1653,7 +1653,7 @@ GNUNET_TESTBED_underlay_construct_ (int num_peers,
1653 break; 1653 break;
1654 } 1654 }
1655 } 1655 }
1656 GNUNET_free_non_null (underlay->link_array); 1656 GNUNET_free (underlay->link_array);
1657 return ret; 1657 return ret;
1658} 1658}
1659 1659
diff --git a/src/testing/gnunet-testing.c b/src/testing/gnunet-testing.c
index a9e5042b2..88906e5fa 100644
--- a/src/testing/gnunet-testing.c
+++ b/src/testing/gnunet-testing.c
@@ -365,7 +365,7 @@ run_no_scheduler (void *cls,
365 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Extracting hostkey %u\n", create_no); 365 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Extracting hostkey %u\n", create_no);
366 ret = create_hostkeys (create_no); 366 ret = create_hostkeys (create_no);
367 } 367 }
368 GNUNET_free_non_null (create_cfg_template); 368 GNUNET_free (create_cfg_template);
369} 369}
370 370
371 371
diff --git a/src/testing/test_testing_peerstartup.c b/src/testing/test_testing_peerstartup.c
index 4e21fedc9..25cbb2a9f 100644
--- a/src/testing/test_testing_peerstartup.c
+++ b/src/testing/test_testing_peerstartup.c
@@ -118,7 +118,7 @@ run (void *cls, char *const *args, const char *cfgfile,
118 118
119end: 119end:
120 GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); 120 GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx);
121 GNUNET_free_non_null (emsg); 121 GNUNET_free (emsg);
122} 122}
123 123
124 124
diff --git a/src/testing/test_testing_peerstartup2.c b/src/testing/test_testing_peerstartup2.c
index 26948b7c5..8d357cb08 100644
--- a/src/testing/test_testing_peerstartup2.c
+++ b/src/testing/test_testing_peerstartup2.c
@@ -197,7 +197,7 @@ run (void *cls, char *const *args, const char *cfgfile,
197end: 197end:
198 FAIL_TEST (0); 198 FAIL_TEST (0);
199 GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); 199 GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx);
200 GNUNET_free_non_null (emsg); 200 GNUNET_free (emsg);
201} 201}
202 202
203 203
diff --git a/src/testing/test_testing_sharedservices.c b/src/testing/test_testing_sharedservices.c
index 77def3453..d2f760d7a 100644
--- a/src/testing/test_testing_sharedservices.c
+++ b/src/testing/test_testing_sharedservices.c
@@ -139,7 +139,7 @@ run (void *cls, char *const *args, const char *cfgfile,
139 139
140end: 140end:
141 GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx); 141 GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx);
142 GNUNET_free_non_null (emsg); 142 GNUNET_free (emsg);
143} 143}
144 144
145 145
diff --git a/src/testing/testing.c b/src/testing/testing.c
index 23bc40d7e..0ca4c3063 100644
--- a/src/testing/testing.c
+++ b/src/testing/testing.c
@@ -473,8 +473,8 @@ cleanup_shared_service_instance (struct SharedServiceInstance *i)
473 (void) unlink (i->cfg_fn); 473 (void) unlink (i->cfg_fn);
474 GNUNET_free (i->cfg_fn); 474 GNUNET_free (i->cfg_fn);
475 } 475 }
476 GNUNET_free_non_null (i->unix_sock); 476 GNUNET_free (i->unix_sock);
477 GNUNET_free_non_null (i->port_str); 477 GNUNET_free (i->port_str);
478 GNUNET_break (NULL == i->proc); 478 GNUNET_break (NULL == i->proc);
479 GNUNET_break (0 == i->n_refs); 479 GNUNET_break (0 == i->n_refs);
480 GNUNET_free (i); 480 GNUNET_free (i);
@@ -551,17 +551,17 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system,
551 stop_shared_service_instance (i); 551 stop_shared_service_instance (i);
552 cleanup_shared_service_instance (i); 552 cleanup_shared_service_instance (i);
553 } 553 }
554 GNUNET_free_non_null (ss->instances); 554 GNUNET_free (ss->instances);
555 GNUNET_CONFIGURATION_destroy (ss->cfg); 555 GNUNET_CONFIGURATION_destroy (ss->cfg);
556 GNUNET_free (ss->sname); 556 GNUNET_free (ss->sname);
557 GNUNET_free (ss); 557 GNUNET_free (ss);
558 } 558 }
559 GNUNET_free_non_null (system->shared_services); 559 GNUNET_free (system->shared_services);
560 if (GNUNET_YES == remove_paths) 560 if (GNUNET_YES == remove_paths)
561 GNUNET_DISK_directory_remove (system->tmppath); 561 GNUNET_DISK_directory_remove (system->tmppath);
562 GNUNET_free (system->tmppath); 562 GNUNET_free (system->tmppath);
563 GNUNET_free_non_null (system->trusted_ip); 563 GNUNET_free (system->trusted_ip);
564 GNUNET_free_non_null (system->hostname); 564 GNUNET_free (system->hostname);
565 GNUNET_free (system); 565 GNUNET_free (system);
566} 566}
567 567
@@ -957,7 +957,7 @@ update_config_sections (void *cls, const char *section)
957 } 957 }
958 GNUNET_free (ikeys); 958 GNUNET_free (ikeys);
959 } 959 }
960 GNUNET_free_non_null (val); 960 GNUNET_free (val);
961 ACCEPT_FROM_key = "ACCEPT_FROM"; 961 ACCEPT_FROM_key = "ACCEPT_FROM";
962 if ((NULL != uc->system->trusted_ip) && 962 if ((NULL != uc->system->trusted_ip) &&
963 (NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */ 963 (NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */
@@ -1120,7 +1120,7 @@ GNUNET_TESTING_configuration_create_ (struct GNUNET_TESTING_System *system,
1120 *nports = uc.nports; 1120 *nports = uc.nports;
1121 } 1121 }
1122 else 1122 else
1123 GNUNET_free_non_null (uc.ports); 1123 GNUNET_free (uc.ports);
1124 return uc.status; 1124 return uc.status;
1125} 1125}
1126 1126
@@ -1316,8 +1316,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
1316 return peer; 1316 return peer;
1317 1317
1318err_ret: 1318err_ret:
1319 GNUNET_free_non_null (ss_instances); 1319 GNUNET_free (ss_instances);
1320 GNUNET_free_non_null (ports); 1320 GNUNET_free (ports);
1321 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_); 1321 GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
1322 if (NULL != emsg) 1322 if (NULL != emsg)
1323 *emsg = emsg_; 1323 *emsg = emsg_;
@@ -1566,8 +1566,8 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer)
1566 GNUNET_CONFIGURATION_destroy (peer->cfg); 1566 GNUNET_CONFIGURATION_destroy (peer->cfg);
1567 GNUNET_free (peer->main_binary); 1567 GNUNET_free (peer->main_binary);
1568 GNUNET_free (peer->args); 1568 GNUNET_free (peer->args);
1569 GNUNET_free_non_null (peer->id); 1569 GNUNET_free (peer->id);
1570 GNUNET_free_non_null (peer->ss_instances); 1570 GNUNET_free (peer->ss_instances);
1571 if (NULL != peer->ports) 1571 if (NULL != peer->ports)
1572 { 1572 {
1573 for (cnt = 0; cnt < peer->nports; cnt++) 1573 for (cnt = 0; cnt < peer->nports; cnt++)
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index c6f600df1..b380c0bd4 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -275,7 +275,7 @@ free_peer (void *cls, const struct GNUNET_PeerIdentity *pid, void *value)
275 } 275 }
276 if (NULL != pos->hello) 276 if (NULL != pos->hello)
277 { 277 {
278 GNUNET_free_non_null (pos->hello); 278 GNUNET_free (pos->hello);
279 pos->hello = NULL; 279 pos->hello = NULL;
280 } 280 }
281 if (NULL != pos->filter) 281 if (NULL != pos->filter)
@@ -812,7 +812,7 @@ process_peer (void *cls,
812 pos = GNUNET_CONTAINER_multipeermap_get (peers, peer); 812 pos = GNUNET_CONTAINER_multipeermap_get (peers, peer);
813 if (NULL != pos) 813 if (NULL != pos)
814 { 814 {
815 GNUNET_free_non_null (pos->hello); 815 GNUNET_free (pos->hello);
816 pos->hello = NULL; 816 pos->hello = NULL;
817 if (NULL != pos->filter) 817 if (NULL != pos->filter)
818 { 818 {
diff --git a/src/transport/gnunet-communicator-udp.c b/src/transport/gnunet-communicator-udp.c
index 585b29c2d..efbbd08a7 100644
--- a/src/transport/gnunet-communicator-udp.c
+++ b/src/transport/gnunet-communicator-udp.c
@@ -783,7 +783,7 @@ bi_destroy (struct BroadcastInterface *bi)
783 GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi); 783 GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi);
784 GNUNET_SCHEDULER_cancel (bi->broadcast_task); 784 GNUNET_SCHEDULER_cancel (bi->broadcast_task);
785 GNUNET_free (bi->sa); 785 GNUNET_free (bi->sa);
786 GNUNET_free_non_null (bi->ba); 786 GNUNET_free (bi->ba);
787 GNUNET_free (bi); 787 GNUNET_free (bi);
788} 788}
789 789
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 93fa031f4..9bdcd64be 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -2108,7 +2108,7 @@ free_blacklist_entry (void *cls,
2108{ 2108{
2109 char *be = value; 2109 char *be = value;
2110 2110
2111 GNUNET_free_non_null (be); 2111 GNUNET_free (be);
2112 return GNUNET_OK; 2112 return GNUNET_OK;
2113} 2113}
2114 2114
@@ -2511,7 +2511,7 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc)
2511 GNUNET_SCHEDULER_cancel (bc->task); 2511 GNUNET_SCHEDULER_cancel (bc->task);
2512 bc->task = NULL; 2512 bc->task = NULL;
2513 } 2513 }
2514 GNUNET_free_non_null (bc->address); 2514 GNUNET_free (bc->address);
2515 GNUNET_free (bc); 2515 GNUNET_free (bc);
2516} 2516}
2517 2517
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index ed6565d23..472c77c27 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -182,7 +182,7 @@ refresh_hello_task (void *cls)
182 gc.addr_pos = oal_head; 182 gc.addr_pos = oal_head;
183 gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); 183 gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration);
184 184
185 GNUNET_free_non_null (our_hello); 185 GNUNET_free (our_hello);
186 our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key, 186 our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key,
187 &address_generator, 187 &address_generator,
188 &gc, 188 &gc,
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 35da5ec10..0d71e1ff9 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -339,7 +339,7 @@ destroy_it (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
339 GNUNET_assert ( 339 GNUNET_assert (
340 GNUNET_OK == 340 GNUNET_OK ==
341 GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value)); 341 GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value));
342 GNUNET_free_non_null (m->address); 342 GNUNET_free (m->address);
343 GNUNET_free (value); 343 GNUNET_free (value);
344 return GNUNET_OK; 344 return GNUNET_OK;
345} 345}
@@ -1037,7 +1037,7 @@ plugin_monitoring_cb (void *cls,
1037 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); 1037 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
1038 addr->asc = NULL; 1038 addr->asc = NULL;
1039 } 1039 }
1040 GNUNET_free_non_null (addr->str); 1040 GNUNET_free (addr->str);
1041 GNUNET_free (addr); 1041 GNUNET_free (addr);
1042 *session_ctx = NULL; 1042 *session_ctx = NULL;
1043 } 1043 }
@@ -1069,7 +1069,7 @@ plugin_monitoring_cb (void *cls,
1069 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); 1069 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
1070 addr->asc = NULL; 1070 addr->asc = NULL;
1071 } 1071 }
1072 GNUNET_free_non_null (addr->str); 1072 GNUNET_free (addr->str);
1073 GNUNET_free (addr); 1073 GNUNET_free (addr);
1074 *session_ctx = NULL; 1074 *session_ctx = NULL;
1075 } 1075 }
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 87cd7ead2..92ed2fe52 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -2207,9 +2207,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
2207 _ ("Shutdown for plugin `%s' complete\n"), 2207 _ ("Shutdown for plugin `%s' complete\n"),
2208 plugin->name); 2208 plugin->name);
2209 GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions); 2209 GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions);
2210 GNUNET_free_non_null (plugin->proxy_hostname); 2210 GNUNET_free (plugin->proxy_hostname);
2211 GNUNET_free_non_null (plugin->proxy_username); 2211 GNUNET_free (plugin->proxy_username);
2212 GNUNET_free_non_null (plugin->proxy_password); 2212 GNUNET_free (plugin->proxy_password);
2213 GNUNET_free (plugin); 2213 GNUNET_free (plugin);
2214 GNUNET_free (api); 2214 GNUNET_free (api);
2215 return NULL; 2215 return NULL;
@@ -2304,9 +2304,9 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
2304 GNUNET_free (proxy_type); 2304 GNUNET_free (proxy_type);
2305 GNUNET_free (plugin->proxy_hostname); 2305 GNUNET_free (plugin->proxy_hostname);
2306 plugin->proxy_hostname = NULL; 2306 plugin->proxy_hostname = NULL;
2307 GNUNET_free_non_null (plugin->proxy_username); 2307 GNUNET_free (plugin->proxy_username);
2308 plugin->proxy_username = NULL; 2308 plugin->proxy_username = NULL;
2309 GNUNET_free_non_null (plugin->proxy_password); 2309 GNUNET_free (plugin->proxy_password);
2310 plugin->proxy_password = NULL; 2310 plugin->proxy_password = NULL;
2311 2311
2312 return GNUNET_SYSERR; 2312 return GNUNET_SYSERR;
@@ -2325,7 +2325,7 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
2325 if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel) 2325 if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel)
2326 plugin->proxy_use_httpproxytunnel = GNUNET_NO; 2326 plugin->proxy_use_httpproxytunnel = GNUNET_NO;
2327 2327
2328 GNUNET_free_non_null (proxy_type); 2328 GNUNET_free (proxy_type);
2329 } 2329 }
2330 2330
2331 /* Should we emulate an XHR client for testing? */ 2331 /* Should we emulate an XHR client for testing? */
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index 2bcab42b4..d81d6db9c 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -34,10 +34,10 @@ http_clean_splitted (struct SplittedHTTPAddress *spa)
34{ 34{
35 if (NULL != spa) 35 if (NULL != spa)
36 { 36 {
37 GNUNET_free_non_null (spa->protocol); 37 GNUNET_free (spa->protocol);
38 GNUNET_free_non_null (spa->host); 38 GNUNET_free (spa->host);
39 GNUNET_free_non_null (spa->path); 39 GNUNET_free (spa->path);
40 GNUNET_free_non_null (spa); 40 GNUNET_free (spa);
41 } 41 }
42} 42}
43 43
@@ -494,7 +494,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
494 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); 494 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
495 asc (asc_cls, NULL, GNUNET_OK); 495 asc (asc_cls, NULL, GNUNET_OK);
496 http_clean_splitted (saddr); 496 http_clean_splitted (saddr);
497 GNUNET_free_non_null (sock_addr); 497 GNUNET_free (sock_addr);
498 return; 498 return;
499 } 499 }
500 if ((GNUNET_YES == numeric) && 500 if ((GNUNET_YES == numeric) &&
@@ -510,7 +510,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
510 goto handle_error; 510 goto handle_error;
511 } 511 }
512 /* Wait for resolver callback */ 512 /* Wait for resolver callback */
513 GNUNET_free_non_null (sock_addr); 513 GNUNET_free (sock_addr);
514 return; 514 return;
515 } 515 }
516 if ((GNUNET_NO == numeric) && 516 if ((GNUNET_NO == numeric) &&
@@ -531,7 +531,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
531 goto handle_error; 531 goto handle_error;
532 } 532 }
533 /* Wait for resolver callback */ 533 /* Wait for resolver callback */
534 GNUNET_free_non_null (sock_addr); 534 GNUNET_free (sock_addr);
535 return; 535 return;
536 } 536 }
537 if ((GNUNET_NO == numeric) && 537 if ((GNUNET_NO == numeric) &&
@@ -541,7 +541,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
541 ret = http_common_plugin_address_to_string (type, address, addrlen); 541 ret = http_common_plugin_address_to_string (type, address, addrlen);
542 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); 542 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
543 asc (asc_cls, NULL, GNUNET_OK); 543 asc (asc_cls, NULL, GNUNET_OK);
544 GNUNET_free_non_null (sock_addr); 544 GNUNET_free (sock_addr);
545 http_clean_splitted (saddr); 545 http_clean_splitted (saddr);
546 return; 546 return;
547 } 547 }
@@ -553,7 +553,7 @@ handle_error:
553 /* Report error */ 553 /* Report error */
554 asc (asc_cls, NULL, GNUNET_SYSERR); 554 asc (asc_cls, NULL, GNUNET_SYSERR);
555 asc (asc_cls, NULL, GNUNET_OK); 555 asc (asc_cls, NULL, GNUNET_OK);
556 GNUNET_free_non_null (sock_addr); 556 GNUNET_free (sock_addr);
557 if (NULL != saddr) 557 if (NULL != saddr)
558 http_clean_splitted (saddr); 558 http_clean_splitted (saddr);
559} 559}
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index eef83b29d..514f7fd1f 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1495,7 +1495,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1495 http_common_plugin_address_to_string (plugin->protocol, 1495 http_common_plugin_address_to_string (plugin->protocol,
1496 addr, 1496 addr,
1497 addr_len)); 1497 addr_len));
1498 GNUNET_free_non_null (addr); 1498 GNUNET_free (addr);
1499 } 1499 }
1500 1500
1501 if ((_RECEIVE == direction) && 1501 if ((_RECEIVE == direction) &&
@@ -2179,9 +2179,9 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
2179 { 2179 {
2180 struct GNUNET_OS_Process *cert_creation; 2180 struct GNUNET_OS_Process *cert_creation;
2181 2181
2182 GNUNET_free_non_null (plugin->key); 2182 GNUNET_free (plugin->key);
2183 plugin->key = NULL; 2183 plugin->key = NULL;
2184 GNUNET_free_non_null (plugin->cert); 2184 GNUNET_free (plugin->cert);
2185 plugin->cert = NULL; 2185 plugin->cert = NULL;
2186 2186
2187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2203,11 +2203,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
2203 GNUNET_free (key_file); 2203 GNUNET_free (key_file);
2204 GNUNET_free (cert_file); 2204 GNUNET_free (cert_file);
2205 2205
2206 GNUNET_free_non_null (plugin->key); 2206 GNUNET_free (plugin->key);
2207 plugin->key = NULL; 2207 plugin->key = NULL;
2208 GNUNET_free_non_null (plugin->cert); 2208 GNUNET_free (plugin->cert);
2209 plugin->cert = NULL; 2209 plugin->cert = NULL;
2210 GNUNET_free_non_null (plugin->crypto_init); 2210 GNUNET_free (plugin->crypto_init);
2211 plugin->crypto_init = NULL; 2211 plugin->crypto_init = NULL;
2212 2212
2213 return GNUNET_SYSERR; 2213 return GNUNET_SYSERR;
@@ -2228,11 +2228,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
2228 GNUNET_free (key_file); 2228 GNUNET_free (key_file);
2229 GNUNET_free (cert_file); 2229 GNUNET_free (cert_file);
2230 2230
2231 GNUNET_free_non_null (plugin->key); 2231 GNUNET_free (plugin->key);
2232 plugin->key = NULL; 2232 plugin->key = NULL;
2233 GNUNET_free_non_null (plugin->cert); 2233 GNUNET_free (plugin->cert);
2234 plugin->cert = NULL; 2234 plugin->cert = NULL;
2235 GNUNET_free_non_null (plugin->crypto_init); 2235 GNUNET_free (plugin->crypto_init);
2236 plugin->crypto_init = NULL; 2236 plugin->crypto_init = NULL;
2237 2237
2238 return GNUNET_SYSERR; 2238 return GNUNET_SYSERR;
@@ -2871,8 +2871,8 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin)
2871 GNUNET_assert (NULL != addrs[res]); 2871 GNUNET_assert (NULL != addrs[res]);
2872 GNUNET_free (addrs[res]); 2872 GNUNET_free (addrs[res]);
2873 } 2873 }
2874 GNUNET_free_non_null (addrs); 2874 GNUNET_free (addrs);
2875 GNUNET_free_non_null (addrlens); 2875 GNUNET_free (addrlens);
2876} 2876}
2877 2877
2878 2878
@@ -3316,9 +3316,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
3316 plugin->server_v6_task = NULL; 3316 plugin->server_v6_task = NULL;
3317 } 3317 }
3318#if BUILD_HTTPS 3318#if BUILD_HTTPS
3319 GNUNET_free_non_null (plugin->crypto_init); 3319 GNUNET_free (plugin->crypto_init);
3320 GNUNET_free_non_null (plugin->cert); 3320 GNUNET_free (plugin->cert);
3321 GNUNET_free_non_null (plugin->key); 3321 GNUNET_free (plugin->key);
3322#endif 3322#endif
3323 GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, 3323 GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions,
3324 &destroy_session_shutdown_cb, 3324 &destroy_session_shutdown_cb,
@@ -3336,10 +3336,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
3336 plugin->server_v6 = NULL; 3336 plugin->server_v6 = NULL;
3337 } 3337 }
3338 /* Clean up */ 3338 /* Clean up */
3339 GNUNET_free_non_null (plugin->external_hostname); 3339 GNUNET_free (plugin->external_hostname);
3340 GNUNET_free_non_null (plugin->ext_addr); 3340 GNUNET_free (plugin->ext_addr);
3341 GNUNET_free_non_null (plugin->server_addr_v4); 3341 GNUNET_free (plugin->server_addr_v4);
3342 GNUNET_free_non_null (plugin->server_addr_v6); 3342 GNUNET_free (plugin->server_addr_v6);
3343 regfree (&plugin->url_regex); 3343 regfree (&plugin->url_regex);
3344 3344
3345 LOG (GNUNET_ERROR_TYPE_DEBUG, 3345 LOG (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 4cec181b0..e3bc21543 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1186,7 +1186,7 @@ get_server_addresses (const char *service_name,
1186 (EACCES == errno)) 1186 (EACCES == errno))
1187 { 1187 {
1188 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); 1188 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
1189 GNUNET_free_non_null (hostname); 1189 GNUNET_free (hostname);
1190 GNUNET_free (unixpath); 1190 GNUNET_free (unixpath);
1191 return GNUNET_SYSERR; 1191 return GNUNET_SYSERR;
1192 } 1192 }
@@ -1212,7 +1212,7 @@ get_server_addresses (const char *service_name,
1212 _ ( 1212 _ (
1213 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 1213 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
1214 service_name); 1214 service_name);
1215 GNUNET_free_non_null (hostname); 1215 GNUNET_free (hostname);
1216 return GNUNET_SYSERR; 1216 return GNUNET_SYSERR;
1217 } 1217 }
1218 if (0 == port) 1218 if (0 == port)
@@ -1220,8 +1220,8 @@ get_server_addresses (const char *service_name,
1220 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); 1220 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
1221 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); 1221 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
1222 add_unixpath (saddrs, saddrlens, unixpath, abstract); 1222 add_unixpath (saddrs, saddrlens, unixpath, abstract);
1223 GNUNET_free_non_null (unixpath); 1223 GNUNET_free (unixpath);
1224 GNUNET_free_non_null (hostname); 1224 GNUNET_free (hostname);
1225 *addrs = saddrs; 1225 *addrs = saddrs;
1226 *addr_lens = saddrlens; 1226 *addr_lens = saddrlens;
1227 return 1; 1227 return 1;
@@ -1245,7 +1245,7 @@ get_server_addresses (const char *service_name,
1245 hostname, 1245 hostname,
1246 gai_strerror (ret)); 1246 gai_strerror (ret));
1247 GNUNET_free (hostname); 1247 GNUNET_free (hostname);
1248 GNUNET_free_non_null (unixpath); 1248 GNUNET_free (unixpath);
1249 return GNUNET_SYSERR; 1249 return GNUNET_SYSERR;
1250 } 1250 }
1251 next = res; 1251 next = res;
@@ -1265,7 +1265,7 @@ get_server_addresses (const char *service_name,
1265 hostname); 1265 hostname);
1266 freeaddrinfo (res); 1266 freeaddrinfo (res);
1267 GNUNET_free (hostname); 1267 GNUNET_free (hostname);
1268 GNUNET_free_non_null (unixpath); 1268 GNUNET_free (unixpath);
1269 return GNUNET_SYSERR; 1269 return GNUNET_SYSERR;
1270 } 1270 }
1271 resi = i; 1271 resi = i;
@@ -1372,7 +1372,7 @@ get_server_addresses (const char *service_name,
1372 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 1372 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
1373 } 1373 }
1374 } 1374 }
1375 GNUNET_free_non_null (unixpath); 1375 GNUNET_free (unixpath);
1376 *addrs = saddrs; 1376 *addrs = saddrs;
1377 *addr_lens = saddrlens; 1377 *addr_lens = saddrlens;
1378 return resi; 1378 return resi;
@@ -3163,7 +3163,7 @@ handle_tcp_welcome (void *cls,
3163 else 3163 else
3164 { 3164 {
3165 GNUNET_break (0); 3165 GNUNET_break (0);
3166 GNUNET_free_non_null (vaddr); 3166 GNUNET_free (vaddr);
3167 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 3167 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
3168 return; 3168 return;
3169 } 3169 }
@@ -3267,7 +3267,7 @@ handle_tcp_data (void *cls,
3267 GNUNET_a2s (vaddr, alen)); 3267 GNUNET_a2s (vaddr, alen));
3268 GNUNET_break_op (0); 3268 GNUNET_break_op (0);
3269 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 3269 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
3270 GNUNET_free_non_null (vaddr); 3270 GNUNET_free (vaddr);
3271 return; 3271 return;
3272 } 3272 }
3273 if (GNUNET_YES == session->expecting_welcome) 3273 if (GNUNET_YES == session->expecting_welcome)
@@ -3284,7 +3284,7 @@ handle_tcp_data (void *cls,
3284 GNUNET_a2s (vaddr, alen)); 3284 GNUNET_a2s (vaddr, alen));
3285 GNUNET_break_op (0); 3285 GNUNET_break_op (0);
3286 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 3286 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
3287 GNUNET_free_non_null (vaddr); 3287 GNUNET_free (vaddr);
3288 return; 3288 return;
3289 } 3289 }
3290 3290
@@ -3300,7 +3300,7 @@ handle_tcp_data (void *cls,
3300 (unsigned int) ntohs (message->type), 3300 (unsigned int) ntohs (message->type),
3301 GNUNET_i2s (&session->target), 3301 GNUNET_i2s (&session->target),
3302 GNUNET_a2s (vaddr, alen)); 3302 GNUNET_a2s (vaddr, alen));
3303 GNUNET_free_non_null (vaddr); 3303 GNUNET_free (vaddr);
3304 } 3304 }
3305 3305
3306 GNUNET_STATISTICS_update (plugin->env->stats, 3306 GNUNET_STATISTICS_update (plugin->env->stats,
@@ -3802,8 +3802,8 @@ libgnunet_plugin_transport_tcp_init (void *cls)
3802 plugin); 3802 plugin);
3803 for (ret = ret_s - 1; ret >= 0; ret--) 3803 for (ret = ret_s - 1; ret >= 0; ret--)
3804 GNUNET_free (addrs[ret]); 3804 GNUNET_free (addrs[ret]);
3805 GNUNET_free_non_null (addrs); 3805 GNUNET_free (addrs);
3806 GNUNET_free_non_null (addrlens); 3806 GNUNET_free (addrlens);
3807 } 3807 }
3808 else 3808 else
3809 { 3809 {
@@ -3893,7 +3893,7 @@ die:
3893 if (NULL != service) 3893 if (NULL != service)
3894 LEGACY_SERVICE_stop (service); 3894 LEGACY_SERVICE_stop (service);
3895 GNUNET_free (plugin); 3895 GNUNET_free (plugin);
3896 GNUNET_free_non_null (api); 3896 GNUNET_free (api);
3897 return NULL; 3897 return NULL;
3898} 3898}
3899 3899
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index ef4fddb24..ec3a0edd8 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -3669,7 +3669,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
3669 } 3669 }
3670 have_bind4 = GNUNET_YES; 3670 have_bind4 = GNUNET_YES;
3671 } 3671 }
3672 GNUNET_free_non_null (bind4_address); 3672 GNUNET_free (bind4_address);
3673 have_bind6 = GNUNET_NO; 3673 have_bind6 = GNUNET_NO;
3674 memset (&server_addrv6, 0, sizeof(server_addrv6)); 3674 memset (&server_addrv6, 0, sizeof(server_addrv6));
3675 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, 3675 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
@@ -3691,7 +3691,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
3691 } 3691 }
3692 have_bind6 = GNUNET_YES; 3692 have_bind6 = GNUNET_YES;
3693 } 3693 }
3694 GNUNET_free_non_null (bind6_address); 3694 GNUNET_free (bind6_address);
3695 3695
3696 enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, 3696 enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
3697 "transport-udp", 3697 "transport-udp",
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 17d72135b..74b8d5a8a 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -2093,7 +2093,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
2093 GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer); 2093 GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer);
2094 plugin->helper_payload_tokenizer = NULL; 2094 plugin->helper_payload_tokenizer = NULL;
2095 } 2095 }
2096 GNUNET_free_non_null (plugin->wlan_interface); 2096 GNUNET_free (plugin->wlan_interface);
2097 GNUNET_free (plugin); 2097 GNUNET_free (plugin);
2098 GNUNET_free (api); 2098 GNUNET_free (api);
2099 return NULL; 2099 return NULL;
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c
index 4e8c8140d..3e173b8a4 100644
--- a/src/transport/tcp_connection_legacy.c
+++ b/src/transport/tcp_connection_legacy.c
@@ -1088,8 +1088,8 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *connection)
1088 * leak the socket in this special case) ... */ 1088 * leak the socket in this special case) ... */
1089 } 1089 }
1090 } 1090 }
1091 GNUNET_free_non_null (connection->addr); 1091 GNUNET_free (connection->addr);
1092 GNUNET_free_non_null (connection->hostname); 1092 GNUNET_free (connection->hostname);
1093 GNUNET_free (connection->write_buffer); 1093 GNUNET_free (connection->write_buffer);
1094 GNUNET_free (connection); 1094 GNUNET_free (connection);
1095} 1095}
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c
index fb4e9c3c9..12dce3993 100644
--- a/src/transport/tcp_service_legacy.c
+++ b/src/transport/tcp_service_legacy.c
@@ -657,7 +657,7 @@ LEGACY_SERVICE_get_server_addresses (
657 (EACCES == errno)) 657 (EACCES == errno))
658 { 658 {
659 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); 659 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
660 GNUNET_free_non_null (hostname); 660 GNUNET_free (hostname);
661 GNUNET_free (unixpath); 661 GNUNET_free (unixpath);
662 return GNUNET_SYSERR; 662 return GNUNET_SYSERR;
663 } 663 }
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses (
683 _ ( 683 _ (
684 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 684 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
685 service_name); 685 service_name);
686 GNUNET_free_non_null (hostname); 686 GNUNET_free (hostname);
687 return GNUNET_SYSERR; 687 return GNUNET_SYSERR;
688 } 688 }
689 if (0 == port) 689 if (0 == port)
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses (
691 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); 691 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
692 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); 692 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
693 add_unixpath (saddrs, saddrlens, unixpath, abstract); 693 add_unixpath (saddrs, saddrlens, unixpath, abstract);
694 GNUNET_free_non_null (unixpath); 694 GNUNET_free (unixpath);
695 GNUNET_free_non_null (hostname); 695 GNUNET_free (hostname);
696 *addrs = saddrs; 696 *addrs = saddrs;
697 *addr_lens = saddrlens; 697 *addr_lens = saddrlens;
698 return 1; 698 return 1;
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses (
716 hostname, 716 hostname,
717 gai_strerror (ret)); 717 gai_strerror (ret));
718 GNUNET_free (hostname); 718 GNUNET_free (hostname);
719 GNUNET_free_non_null (unixpath); 719 GNUNET_free (unixpath);
720 return GNUNET_SYSERR; 720 return GNUNET_SYSERR;
721 } 721 }
722 next = res; 722 next = res;
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses (
736 hostname); 736 hostname);
737 freeaddrinfo (res); 737 freeaddrinfo (res);
738 GNUNET_free (hostname); 738 GNUNET_free (hostname);
739 GNUNET_free_non_null (unixpath); 739 GNUNET_free (unixpath);
740 return GNUNET_SYSERR; 740 return GNUNET_SYSERR;
741 } 741 }
742 resi = i; 742 resi = i;
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses (
843 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 843 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
844 } 844 }
845 } 845 }
846 GNUNET_free_non_null (unixpath); 846 GNUNET_free (unixpath);
847 *addrs = saddrs; 847 *addrs = saddrs;
848 *addr_lens = saddrlens; 848 *addr_lens = saddrlens;
849 return resi; 849 return resi;
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
1024 { 1024 {
1025 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); 1025 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir);
1026 GNUNET_free (rdir); 1026 GNUNET_free (rdir);
1027 GNUNET_free_non_null (user); 1027 GNUNET_free (user);
1028 GNUNET_free (pif); 1028 GNUNET_free (pif);
1029 return GNUNET_SYSERR; 1029 return GNUNET_SYSERR;
1030 } 1030 }
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
1034 { 1034 {
1035 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); 1035 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif);
1036 GNUNET_free (pif); 1036 GNUNET_free (pif);
1037 GNUNET_free_non_null (user); 1037 GNUNET_free (user);
1038 return GNUNET_SYSERR; 1038 return GNUNET_SYSERR;
1039 } 1039 }
1040 if (0 > fprintf (pidfd, "%u", pid)) 1040 if (0 > fprintf (pidfd, "%u", pid))
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
1042 GNUNET_break (0 == fclose (pidfd)); 1042 GNUNET_break (0 == fclose (pidfd));
1043 if ((NULL != user) && (0 < strlen (user))) 1043 if ((NULL != user) && (0 < strlen (user)))
1044 GNUNET_DISK_file_change_owner (pif, user); 1044 GNUNET_DISK_file_change_owner (pif, user);
1045 GNUNET_free_non_null (user); 1045 GNUNET_free (user);
1046 GNUNET_free (pif); 1046 GNUNET_free (pif);
1047 return GNUNET_OK; 1047 return GNUNET_OK;
1048} 1048}
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc,
1441 /* shutdown */ 1441 /* shutdown */
1442 if ((1 == do_daemonize) && (NULL != sctx.server)) 1442 if ((1 == do_daemonize) && (NULL != sctx.server))
1443 pid_file_delete (&sctx); 1443 pid_file_delete (&sctx);
1444 GNUNET_free_non_null (sctx.my_handlers); 1444 GNUNET_free (sctx.my_handlers);
1445 1445
1446shutdown: 1446shutdown:
1447 if (-1 != sctx.ready_confirm_fd) 1447 if (-1 != sctx.ready_confirm_fd)
@@ -1475,16 +1475,16 @@ shutdown:
1475 if (NULL != sctx.addrs) 1475 if (NULL != sctx.addrs)
1476 while (NULL != sctx.addrs[i]) 1476 while (NULL != sctx.addrs[i])
1477 GNUNET_free_nz (sctx.addrs[i++]); 1477 GNUNET_free_nz (sctx.addrs[i++]);
1478 GNUNET_free_non_null (sctx.addrs); 1478 GNUNET_free (sctx.addrs);
1479 GNUNET_free_non_null (sctx.addrlens); 1479 GNUNET_free (sctx.addrlens);
1480 GNUNET_free_non_null (logfile); 1480 GNUNET_free (logfile);
1481 GNUNET_free_non_null (loglev); 1481 GNUNET_free (loglev);
1482 GNUNET_free (cfg_fn); 1482 GNUNET_free (cfg_fn);
1483 GNUNET_free_non_null (opt_cfg_fn); 1483 GNUNET_free (opt_cfg_fn);
1484 GNUNET_free_non_null (sctx.v4_denied); 1484 GNUNET_free (sctx.v4_denied);
1485 GNUNET_free_non_null (sctx.v6_denied); 1485 GNUNET_free (sctx.v6_denied);
1486 GNUNET_free_non_null (sctx.v4_allowed); 1486 GNUNET_free (sctx.v4_allowed);
1487 GNUNET_free_non_null (sctx.v6_allowed); 1487 GNUNET_free (sctx.v6_allowed);
1488 1488
1489 return err ? GNUNET_SYSERR : sctx.ret; 1489 return err ? GNUNET_SYSERR : sctx.ret;
1490} 1490}
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
1626 } 1626 }
1627 if (NULL != sctx->server) 1627 if (NULL != sctx->server)
1628 GNUNET_SERVER_destroy (sctx->server); 1628 GNUNET_SERVER_destroy (sctx->server);
1629 GNUNET_free_non_null (sctx->my_handlers); 1629 GNUNET_free (sctx->my_handlers);
1630 if (NULL != sctx->addrs) 1630 if (NULL != sctx->addrs)
1631 { 1631 {
1632 i = 0; 1632 i = 0;
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
1634 GNUNET_free_nz (sctx->addrs[i++]); 1634 GNUNET_free_nz (sctx->addrs[i++]);
1635 GNUNET_free (sctx->addrs); 1635 GNUNET_free (sctx->addrs);
1636 } 1636 }
1637 GNUNET_free_non_null (sctx->addrlens); 1637 GNUNET_free (sctx->addrlens);
1638 GNUNET_free_non_null (sctx->v4_denied); 1638 GNUNET_free (sctx->v4_denied);
1639 GNUNET_free_non_null (sctx->v6_denied); 1639 GNUNET_free (sctx->v6_denied);
1640 GNUNET_free_non_null (sctx->v4_allowed); 1640 GNUNET_free (sctx->v4_allowed);
1641 GNUNET_free_non_null (sctx->v6_allowed); 1641 GNUNET_free (sctx->v6_allowed);
1642 GNUNET_free (sctx); 1642 GNUNET_free (sctx);
1643} 1643}
1644 1644
diff --git a/src/transport/test_http_common.c b/src/transport/test_http_common.c
index 6e31ec85e..fe6e4faa3 100644
--- a/src/transport/test_http_common.c
+++ b/src/transport/test_http_common.c
@@ -32,9 +32,9 @@ clean (struct SplittedHTTPAddress *addr)
32{ 32{
33 if (NULL == addr) 33 if (NULL == addr)
34 return; 34 return;
35 GNUNET_free_non_null (addr->host); 35 GNUNET_free (addr->host);
36 GNUNET_free_non_null (addr->path); 36 GNUNET_free (addr->path);
37 GNUNET_free_non_null (addr->protocol); 37 GNUNET_free (addr->protocol);
38 GNUNET_free (addr); 38 GNUNET_free (addr);
39} 39}
40 40
diff --git a/src/transport/transport-testing-main.c b/src/transport/transport-testing-main.c
index 8c35ff252..20c58eeee 100644
--- a/src/transport/transport-testing-main.c
+++ b/src/transport/transport-testing-main.c
@@ -604,7 +604,7 @@ GNUNET_TRANSPORT_TESTING_main_ (const char *argv0,
604 for (unsigned int i = 0; i < num_peers; i++) 604 for (unsigned int i = 0; i < num_peers; i++)
605 GNUNET_free (cfg_names[i]); 605 GNUNET_free (cfg_names[i]);
606 GNUNET_free (test_source); 606 GNUNET_free (test_source);
607 GNUNET_free_non_null (test_plugin); 607 GNUNET_free (test_plugin);
608 GNUNET_free (test_name); 608 GNUNET_free (test_name);
609 return ret; 609 return ret;
610} 610}
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 06dbe891a..2da193b31 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -349,7 +349,7 @@ get_hello (void *cb_cls,
349 GNUNET_assert (0 == memcmp (&hello_id, 349 GNUNET_assert (0 == memcmp (&hello_id,
350 &p->id, 350 &p->id,
351 sizeof(hello_id))); 351 sizeof(hello_id)));
352 GNUNET_free_non_null (p->hello); 352 GNUNET_free (p->hello);
353 p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message); 353 p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message);
354 354
355 if (NULL != p->start_cb) 355 if (NULL != p->start_cb)
@@ -460,10 +460,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct
460 cfgname, 460 cfgname,
461 emsg); 461 emsg);
462 GNUNET_TRANSPORT_TESTING_stop_peer (p); 462 GNUNET_TRANSPORT_TESTING_stop_peer (p);
463 GNUNET_free_non_null (emsg); 463 GNUNET_free (emsg);
464 return NULL; 464 return NULL;
465 } 465 }
466 GNUNET_free_non_null (emsg); 466 GNUNET_free (emsg);
467 if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer)) 467 if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer))
468 { 468 {
469 LOG (GNUNET_ERROR_TYPE_ERROR, 469 LOG (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/transport/transport_api2_core.c b/src/transport/transport_api2_core.c
index cd8bacf3d..002af81fc 100644
--- a/src/transport/transport_api2_core.c
+++ b/src/transport/transport_api2_core.c
@@ -762,7 +762,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
762 reconnect (h); 762 reconnect (h);
763 if (NULL == h->mq) 763 if (NULL == h->mq)
764 { 764 {
765 GNUNET_free_non_null (h->handlers); 765 GNUNET_free (h->handlers);
766 GNUNET_free (h); 766 GNUNET_free (h);
767 return NULL; 767 return NULL;
768 } 768 }
@@ -792,7 +792,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
792 } 792 }
793 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); 793 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
794 handle->neighbours = NULL; 794 handle->neighbours = NULL;
795 GNUNET_free_non_null (handle->handlers); 795 GNUNET_free (handle->handlers);
796 handle->handlers = NULL; 796 handle->handlers = NULL;
797 GNUNET_free (handle); 797 GNUNET_free (handle);
798} 798}
diff --git a/src/transport/transport_api_core.c b/src/transport/transport_api_core.c
index 5d841fa10..55647508d 100644
--- a/src/transport/transport_api_core.c
+++ b/src/transport/transport_api_core.c
@@ -891,7 +891,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
891 reconnect (h); 891 reconnect (h);
892 if (NULL == h->mq) 892 if (NULL == h->mq)
893 { 893 {
894 GNUNET_free_non_null (h->handlers); 894 GNUNET_free (h->handlers);
895 GNUNET_free (h); 895 GNUNET_free (h);
896 return NULL; 896 return NULL;
897 } 897 }
@@ -922,7 +922,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
922 } 922 }
923 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); 923 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
924 handle->neighbours = NULL; 924 handle->neighbours = NULL;
925 GNUNET_free_non_null (handle->handlers); 925 GNUNET_free (handle->handlers);
926 handle->handlers = NULL; 926 handle->handlers = NULL;
927 GNUNET_free (handle); 927 GNUNET_free (handle);
928} 928}
diff --git a/src/util/bio.c b/src/util/bio.c
index ce15f073b..b27230240 100644
--- a/src/util/bio.c
+++ b/src/util/bio.c
@@ -171,7 +171,7 @@ GNUNET_BIO_read_close (struct GNUNET_BIO_ReadHandle *h, char **emsg)
171 if (NULL != emsg) 171 if (NULL != emsg)
172 *emsg = h->emsg; 172 *emsg = h->emsg;
173 else 173 else
174 GNUNET_free_non_null (h->emsg); 174 GNUNET_free (h->emsg);
175 switch (h->type) 175 switch (h->type)
176 { 176 {
177 case IO_FILE: 177 case IO_FILE:
@@ -345,7 +345,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
345 GNUNET_asprintf (&h->emsg, 345 GNUNET_asprintf (&h->emsg,
346 _ ("Error reading length of string `%s'"), 346 _ ("Error reading length of string `%s'"),
347 what); 347 what);
348 GNUNET_free_non_null (tmp); 348 GNUNET_free (tmp);
349 return GNUNET_SYSERR; 349 return GNUNET_SYSERR;
350 } 350 }
351 if (0 == big) 351 if (0 == big)
@@ -612,7 +612,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg)
612 if (NULL != emsg) 612 if (NULL != emsg)
613 *emsg = h->emsg; 613 *emsg = h->emsg;
614 else 614 else
615 GNUNET_free_non_null (h->emsg); 615 GNUNET_free (h->emsg);
616 switch (h->type) 616 switch (h->type)
617 { 617 {
618 case IO_FILE: 618 case IO_FILE:
@@ -623,7 +623,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg)
623 if (NULL != emsg) 623 if (NULL != emsg)
624 *emsg = h->emsg; 624 *emsg = h->emsg;
625 else 625 else
626 GNUNET_free_non_null (h->emsg); 626 GNUNET_free (h->emsg);
627 err = GNUNET_SYSERR; 627 err = GNUNET_SYSERR;
628 } 628 }
629 else 629 else
@@ -663,7 +663,7 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h)
663 { 663 {
664 GNUNET_DISK_file_close (h->fd); 664 GNUNET_DISK_file_close (h->fd);
665 h->fd = NULL; 665 h->fd = NULL;
666 GNUNET_free_non_null (h->emsg); 666 GNUNET_free (h->emsg);
667 GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file")); 667 GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file"));
668 return GNUNET_SYSERR; 668 return GNUNET_SYSERR;
669 } 669 }
@@ -698,7 +698,7 @@ GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h,
698 if (NULL != emsg) 698 if (NULL != emsg)
699 *emsg = h->emsg; 699 *emsg = h->emsg;
700 else 700 else
701 GNUNET_free_non_null (h->emsg); 701 GNUNET_free (h->emsg);
702 *contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size); 702 *contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size);
703 return ret; 703 return ret;
704} 704}
@@ -750,7 +750,7 @@ write_to_file (struct GNUNET_BIO_WriteHandle *h,
750 _ ("Error while writing `%s' to file: %s"), 750 _ ("Error while writing `%s' to file: %s"),
751 what, 751 what,
752 tmp); 752 tmp);
753 GNUNET_free_non_null (tmp); 753 GNUNET_free (tmp);
754 return GNUNET_SYSERR; 754 return GNUNET_SYSERR;
755 } 755 }
756 } 756 }
@@ -870,7 +870,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
870 if (-1 == size) 870 if (-1 == size)
871 { 871 {
872 GNUNET_free (buf); 872 GNUNET_free (buf);
873 GNUNET_free_non_null (h->emsg); 873 GNUNET_free (h->emsg);
874 GNUNET_asprintf (&h->emsg, 874 GNUNET_asprintf (&h->emsg,
875 _ ("Failed to serialize metadata `%s'"), 875 _ ("Failed to serialize metadata `%s'"),
876 what); 876 what);
diff --git a/src/util/buffer.c b/src/util/buffer.c
index c865f6307..d0261889e 100644
--- a/src/util/buffer.c
+++ b/src/util/buffer.c
@@ -162,7 +162,7 @@ GNUNET_buffer_reap (struct GNUNET_Buffer *buf, size_t *size)
162void 162void
163GNUNET_buffer_clear (struct GNUNET_Buffer *buf) 163GNUNET_buffer_clear (struct GNUNET_Buffer *buf)
164{ 164{
165 GNUNET_free_non_null (buf->mem); 165 GNUNET_free (buf->mem);
166 memset (buf, 0, sizeof (struct GNUNET_Buffer)); 166 memset (buf, 0, sizeof (struct GNUNET_Buffer));
167} 167}
168 168
diff --git a/src/util/client.c b/src/util/client.c
index a7b1a2a0f..86dabe664 100644
--- a/src/util/client.c
+++ b/src/util/client.c
@@ -422,7 +422,7 @@ connection_client_destroy_impl (struct GNUNET_MQ_Handle *mq,
422 } 422 }
423 cancel_aps (cstate); 423 cancel_aps (cstate);
424 GNUNET_free (cstate->service_name); 424 GNUNET_free (cstate->service_name);
425 GNUNET_free_non_null (cstate->hostname); 425 GNUNET_free (cstate->hostname);
426 GNUNET_MST_destroy (cstate->mst); 426 GNUNET_MST_destroy (cstate->mst);
427 GNUNET_free (cstate); 427 GNUNET_free (cstate);
428} 428}
@@ -563,7 +563,7 @@ try_unixpath (const char *service_name,
563 if (NULL != sock) 563 if (NULL != sock)
564 GNUNET_NETWORK_socket_close (sock); 564 GNUNET_NETWORK_socket_close (sock);
565 } 565 }
566 GNUNET_free_non_null (unixpath); 566 GNUNET_free (unixpath);
567#endif 567#endif
568 return NULL; 568 return NULL;
569} 569}
@@ -747,7 +747,7 @@ test_service_configuration (const char *service_name,
747 _ ("not a valid filename")); 747 _ ("not a valid filename"));
748 return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */ 748 return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */
749 } 749 }
750 GNUNET_free_non_null (unixpath); 750 GNUNET_free (unixpath);
751#endif 751#endif
752 752
753 if ((GNUNET_YES == 753 if ((GNUNET_YES ==
@@ -768,7 +768,7 @@ test_service_configuration (const char *service_name,
768 &hostname)) && 768 &hostname)) &&
769 (0 != strlen (hostname))) 769 (0 != strlen (hostname)))
770 ret = GNUNET_OK; 770 ret = GNUNET_OK;
771 GNUNET_free_non_null (hostname); 771 GNUNET_free (hostname);
772 return ret; 772 return ret;
773} 773}
774 774
@@ -1043,7 +1043,7 @@ GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg,
1043 /* service running remotely */ 1043 /* service running remotely */
1044 ret = GNUNET_OK; 1044 ret = GNUNET_OK;
1045 } 1045 }
1046 GNUNET_free_non_null (hostname); 1046 GNUNET_free (hostname);
1047 return ret; 1047 return ret;
1048} 1048}
1049 1049
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index fd91e23b2..4aad49777 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -323,13 +323,12 @@ GNUNET_xrealloc_ (void *ptr, size_t n, const char *filename, int linenumber)
323 * want to keep track of allocations. 323 * want to keep track of allocations.
324 * 324 *
325 * @param ptr the pointer to free 325 * @param ptr the pointer to free
326 * @param filename where in the code was the call to GNUNET_free 326 * @param filename where in the code was the call to GNUNET_free()
327 * @param linenumber where in the code was the call to GNUNET_free 327 * @param linenumber where in the code was the call to GNUNET_free()
328 */ 328 */
329void 329void
330GNUNET_xfree_ (void *ptr, const char *filename, int linenumber) 330GNUNET_xfree_ (void *ptr, const char *filename, int linenumber)
331{ 331{
332 GNUNET_assert_at (NULL != ptr, filename, linenumber);
333#ifdef W32_MEM_LIMIT 332#ifdef W32_MEM_LIMIT
334 ptr = &((size_t *) ptr)[-1]; 333 ptr = &((size_t *) ptr)[-1];
335 mem_used -= *((size_t *) ptr); 334 mem_used -= *((size_t *) ptr);
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 3894cdda1..b30175543 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -715,9 +715,9 @@ GNUNET_log_setup (const char *comp,
715#if ! defined(GNUNET_CULL_LOGGING) 715#if ! defined(GNUNET_CULL_LOGGING)
716 parse_all_definitions (); 716 parse_all_definitions ();
717#endif 717#endif
718 GNUNET_free_non_null (component); 718 GNUNET_free (component);
719 GNUNET_asprintf (&component, "%s-%d", comp, getpid ()); 719 GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
720 GNUNET_free_non_null (component_nopid); 720 GNUNET_free (component_nopid);
721 component_nopid = GNUNET_strdup (comp); 721 component_nopid = GNUNET_strdup (comp);
722 722
723 env_logfile = getenv ("GNUNET_FORCE_LOGFILE"); 723 env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
@@ -725,7 +725,7 @@ GNUNET_log_setup (const char *comp,
725 logfile = env_logfile; 725 logfile = env_logfile;
726 if (NULL == logfile) 726 if (NULL == logfile)
727 return GNUNET_OK; 727 return GNUNET_OK;
728 GNUNET_free_non_null (log_file_name); 728 GNUNET_free (log_file_name);
729 log_file_name = GNUNET_STRINGS_filename_expand (logfile); 729 log_file_name = GNUNET_STRINGS_filename_expand (logfile);
730 if (NULL == log_file_name) 730 if (NULL == log_file_name)
731 return GNUNET_SYSERR; 731 return GNUNET_SYSERR;
diff --git a/src/util/configuration.c b/src/util/configuration.c
index 7ed87cc1e..34ecc9e73 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -286,7 +286,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg,
286 line_orig = NULL; 286 line_orig = NULL;
287 while (r_bytes < size) 287 while (r_bytes < size)
288 { 288 {
289 GNUNET_free_non_null (line_orig); 289 GNUNET_free (line_orig);
290 /* fgets-like behaviour on buffer */ 290 /* fgets-like behaviour on buffer */
291 to_read = size - r_bytes; 291 to_read = size - r_bytes;
292 pos = memchr (&mem[r_bytes], '\n', to_read); 292 pos = memchr (&mem[r_bytes], '\n', to_read);
@@ -404,7 +404,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg,
404 ret = GNUNET_SYSERR; 404 ret = GNUNET_SYSERR;
405 break; 405 break;
406 } 406 }
407 GNUNET_free_non_null (line_orig); 407 GNUNET_free (line_orig);
408 GNUNET_free (section); 408 GNUNET_free (section);
409 GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size)); 409 GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size));
410 return ret; 410 return ret;
@@ -734,7 +734,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
734 { 734 {
735 spos->entries = ent->next; 735 spos->entries = ent->next;
736 GNUNET_free (ent->key); 736 GNUNET_free (ent->key);
737 GNUNET_free_non_null (ent->val); 737 GNUNET_free (ent->val);
738 GNUNET_free (ent); 738 GNUNET_free (ent);
739 cfg->dirty = GNUNET_YES; 739 cfg->dirty = GNUNET_YES;
740 } 740 }
@@ -926,13 +926,13 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg,
926 { 926 {
927 if (NULL == value) 927 if (NULL == value)
928 { 928 {
929 GNUNET_free_non_null (e->val); 929 GNUNET_free (e->val);
930 e->val = NULL; 930 e->val = NULL;
931 } 931 }
932 else 932 else
933 { 933 {
934 nv = GNUNET_strdup (value); 934 nv = GNUNET_strdup (value);
935 GNUNET_free_non_null (e->val); 935 GNUNET_free (e->val);
936 e->val = nv; 936 e->val = nv;
937 } 937 }
938 return; 938 return;
@@ -1383,7 +1383,7 @@ expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg,
1383 result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1); 1383 result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1);
1384 strcpy (result, prefix); 1384 strcpy (result, prefix);
1385 strcat (result, post); 1385 strcat (result, post);
1386 GNUNET_free_non_null (def); 1386 GNUNET_free (def);
1387 GNUNET_free (prefix); 1387 GNUNET_free (prefix);
1388 GNUNET_free (orig); 1388 GNUNET_free (orig);
1389 return result; 1389 return result;
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c
index eca651862..d7460043d 100644
--- a/src/util/container_bloomfilter.c
+++ b/src/util/container_bloomfilter.c
@@ -707,7 +707,7 @@ GNUNET_CONTAINER_bloomfilter_free (struct GNUNET_CONTAINER_BloomFilter *bf)
707 return; 707 return;
708 if (bf->fh != NULL) 708 if (bf->fh != NULL)
709 GNUNET_DISK_file_close (bf->fh); 709 GNUNET_DISK_file_close (bf->fh);
710 GNUNET_free_non_null (bf->filename); 710 GNUNET_free (bf->filename);
711 GNUNET_free (bf->bitArray); 711 GNUNET_free (bf->bitArray);
712 GNUNET_free (bf); 712 GNUNET_free (bf);
713} 713}
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c
index ad362408e..b66a7b258 100644
--- a/src/util/container_meta_data.c
+++ b/src/util/container_meta_data.c
@@ -217,9 +217,9 @@ GNUNET_CONTAINER_meta_data_create ()
217static void 217static void
218meta_item_free (struct MetaItem *mi) 218meta_item_free (struct MetaItem *mi)
219{ 219{
220 GNUNET_free_non_null (mi->plugin_name); 220 GNUNET_free (mi->plugin_name);
221 GNUNET_free_non_null (mi->mime_type); 221 GNUNET_free (mi->mime_type);
222 GNUNET_free_non_null (mi->data); 222 GNUNET_free (mi->data);
223 GNUNET_free (mi); 223 GNUNET_free (mi);
224} 224}
225 225
@@ -258,7 +258,7 @@ GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md)
258 GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos); 258 GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos);
259 meta_item_free (pos); 259 meta_item_free (pos);
260 } 260 }
261 GNUNET_free_non_null (md->sbuf); 261 GNUNET_free (md->sbuf);
262 GNUNET_free (md); 262 GNUNET_free (md);
263} 263}
264 264
@@ -280,7 +280,7 @@ GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md)
280 GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi); 280 GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi);
281 meta_item_free (mi); 281 meta_item_free (mi);
282 } 282 }
283 GNUNET_free_non_null (md->sbuf); 283 GNUNET_free (md->sbuf);
284 memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData)); 284 memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData));
285} 285}
286 286
@@ -976,7 +976,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
976 if (NULL != pos->mime_type) 976 if (NULL != pos->mime_type)
977 left -= strlen (pos->mime_type) + 1; 977 left -= strlen (pos->mime_type) + 1;
978 978
979 GNUNET_free_non_null (cdata); 979 GNUNET_free (cdata);
980 cdata = NULL; 980 cdata = NULL;
981 981
982 i++; 982 i++;
@@ -1180,7 +1180,7 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size)
1180 ntohl (ent.type), format, mime_type, 1180 ntohl (ent.type), format, mime_type,
1181 meta_data, dlen); 1181 meta_data, dlen);
1182 } 1182 }
1183 GNUNET_free_non_null (data); 1183 GNUNET_free (data);
1184 return md; 1184 return md;
1185} 1185}
1186 1186
diff --git a/src/util/disk.c b/src/util/disk.c
index 9018aa955..cdead59d2 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -1556,8 +1556,8 @@ GNUNET_DISK_pipe_from_fd (int blocking_read, int blocking_write, int fd[2])
1556 GNUNET_break (0 == close (p->fd[0]->fd)); 1556 GNUNET_break (0 == close (p->fd[0]->fd));
1557 if (p->fd[1]->fd >= 0) 1557 if (p->fd[1]->fd >= 0)
1558 GNUNET_break (0 == close (p->fd[1]->fd)); 1558 GNUNET_break (0 == close (p->fd[1]->fd));
1559 GNUNET_free_non_null (p->fd[0]); 1559 GNUNET_free (p->fd[0]);
1560 GNUNET_free_non_null (p->fd[1]); 1560 GNUNET_free (p->fd[1]);
1561 GNUNET_free (p); 1561 GNUNET_free (p);
1562 errno = eno; 1562 errno = eno;
1563 return NULL; 1563 return NULL;
diff --git a/src/util/dnsparser.c b/src/util/dnsparser.c
index ab687414e..401723106 100644
--- a/src/util/dnsparser.c
+++ b/src/util/dnsparser.c
@@ -109,8 +109,8 @@ GNUNET_DNSPARSER_free_soa (struct GNUNET_DNSPARSER_SoaRecord *soa)
109{ 109{
110 if (NULL == soa) 110 if (NULL == soa)
111 return; 111 return;
112 GNUNET_free_non_null (soa->mname); 112 GNUNET_free (soa->mname);
113 GNUNET_free_non_null (soa->rname); 113 GNUNET_free (soa->rname);
114 GNUNET_free (soa); 114 GNUNET_free (soa);
115} 115}
116 116
@@ -125,7 +125,7 @@ GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert)
125{ 125{
126 if (NULL == cert) 126 if (NULL == cert)
127 return; 127 return;
128 GNUNET_free_non_null (cert->certificate_data); 128 GNUNET_free (cert->certificate_data);
129 GNUNET_free (cert); 129 GNUNET_free (cert);
130} 130}
131 131
@@ -140,7 +140,7 @@ GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv)
140{ 140{
141 if (NULL == srv) 141 if (NULL == srv)
142 return; 142 return;
143 GNUNET_free_non_null (srv->target); 143 GNUNET_free (srv->target);
144 GNUNET_free (srv); 144 GNUNET_free (srv);
145} 145}
146 146
@@ -155,7 +155,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx)
155{ 155{
156 if (NULL == mx) 156 if (NULL == mx)
157 return; 157 return;
158 GNUNET_free_non_null (mx->mxhost); 158 GNUNET_free (mx->mxhost);
159 GNUNET_free (mx); 159 GNUNET_free (mx);
160} 160}
161 161
@@ -168,7 +168,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx)
168void 168void
169GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r) 169GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r)
170{ 170{
171 GNUNET_free_non_null (r->name); 171 GNUNET_free (r->name);
172 switch (r->type) 172 switch (r->type)
173 { 173 {
174 case GNUNET_DNSPARSER_TYPE_MX: 174 case GNUNET_DNSPARSER_TYPE_MX:
@@ -190,11 +190,11 @@ GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r)
190 case GNUNET_DNSPARSER_TYPE_NS: 190 case GNUNET_DNSPARSER_TYPE_NS:
191 case GNUNET_DNSPARSER_TYPE_CNAME: 191 case GNUNET_DNSPARSER_TYPE_CNAME:
192 case GNUNET_DNSPARSER_TYPE_PTR: 192 case GNUNET_DNSPARSER_TYPE_PTR:
193 GNUNET_free_non_null (r->data.hostname); 193 GNUNET_free (r->data.hostname);
194 break; 194 break;
195 195
196 default: 196 default:
197 GNUNET_free_non_null (r->data.raw.data); 197 GNUNET_free (r->data.raw.data);
198 break; 198 break;
199 } 199 }
200} 200}
@@ -854,17 +854,17 @@ void
854GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p) 854GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p)
855{ 855{
856 for (unsigned int i = 0; i < p->num_queries; i++) 856 for (unsigned int i = 0; i < p->num_queries; i++)
857 GNUNET_free_non_null (p->queries[i].name); 857 GNUNET_free (p->queries[i].name);
858 GNUNET_free_non_null (p->queries); 858 GNUNET_free (p->queries);
859 for (unsigned int i = 0; i < p->num_answers; i++) 859 for (unsigned int i = 0; i < p->num_answers; i++)
860 GNUNET_DNSPARSER_free_record (&p->answers[i]); 860 GNUNET_DNSPARSER_free_record (&p->answers[i]);
861 GNUNET_free_non_null (p->answers); 861 GNUNET_free (p->answers);
862 for (unsigned int i = 0; i < p->num_authority_records; i++) 862 for (unsigned int i = 0; i < p->num_authority_records; i++)
863 GNUNET_DNSPARSER_free_record (&p->authority_records[i]); 863 GNUNET_DNSPARSER_free_record (&p->authority_records[i]);
864 GNUNET_free_non_null (p->authority_records); 864 GNUNET_free (p->authority_records);
865 for (unsigned int i = 0; i < p->num_additional_records; i++) 865 for (unsigned int i = 0; i < p->num_additional_records; i++)
866 GNUNET_DNSPARSER_free_record (&p->additional_records[i]); 866 GNUNET_DNSPARSER_free_record (&p->additional_records[i]);
867 GNUNET_free_non_null (p->additional_records); 867 GNUNET_free (p->additional_records);
868 GNUNET_free (p); 868 GNUNET_free (p);
869} 869}
870 870
diff --git a/src/util/getopt_helpers.c b/src/util/getopt_helpers.c
index a56ef2d96..592875531 100644
--- a/src/util/getopt_helpers.c
+++ b/src/util/getopt_helpers.c
@@ -377,7 +377,7 @@ set_string (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
377 (void) ctx; 377 (void) ctx;
378 (void) option; 378 (void) option;
379 GNUNET_assert (NULL != value); 379 GNUNET_assert (NULL != value);
380 GNUNET_free_non_null (*val); 380 GNUNET_free (*val);
381 *val = GNUNET_strdup (value); 381 *val = GNUNET_strdup (value);
382 return GNUNET_OK; 382 return GNUNET_OK;
383} 383}
@@ -458,7 +458,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
458 (void) ctx; 458 (void) ctx;
459 (void) option; 459 (void) option;
460 GNUNET_assert (NULL != value); 460 GNUNET_assert (NULL != value);
461 GNUNET_free_non_null (*val); 461 GNUNET_free (*val);
462 *val = GNUNET_STRINGS_filename_expand (value); 462 *val = GNUNET_STRINGS_filename_expand (value);
463 return GNUNET_OK; 463 return GNUNET_OK;
464} 464}
diff --git a/src/util/gnunet-config.c b/src/util/gnunet-config.c
index 5883c1497..2b279dda2 100644
--- a/src/util/gnunet-config.c
+++ b/src/util/gnunet-config.c
@@ -258,7 +258,7 @@ run (void *cls,
258 GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile)) 258 GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile))
259 global_ret = 2; 259 global_ret = 2;
260 } 260 }
261 GNUNET_free_non_null (cfg_fn); 261 GNUNET_free (cfg_fn);
262 if (NULL != out) 262 if (NULL != out)
263 GNUNET_CONFIGURATION_destroy (out); 263 GNUNET_CONFIGURATION_destroy (out);
264cleanup: 264cleanup:
diff --git a/src/util/gnunet-scrypt.c b/src/util/gnunet-scrypt.c
index 7d13ce469..aa64144a8 100644
--- a/src/util/gnunet-scrypt.c
+++ b/src/util/gnunet-scrypt.c
@@ -323,7 +323,7 @@ main (int argc, char *const *argv)
323 ? 0 323 ? 0
324 : 1; 324 : 1;
325 GNUNET_free_nz ((void *) argv); 325 GNUNET_free_nz ((void *) argv);
326 GNUNET_free_non_null (pwfn); 326 GNUNET_free (pwfn);
327 return ret; 327 return ret;
328} 328}
329 329
diff --git a/src/util/gnunet-service-resolver.c b/src/util/gnunet-service-resolver.c
index 357453da7..5ed70807e 100644
--- a/src/util/gnunet-service-resolver.c
+++ b/src/util/gnunet-service-resolver.c
@@ -217,7 +217,7 @@ free_cache_entry (struct ResolveCache *rc)
217 GNUNET_free (pos->record); 217 GNUNET_free (pos->record);
218 GNUNET_free (pos); 218 GNUNET_free (pos);
219 } 219 }
220 GNUNET_free_non_null (rc->hostname); 220 GNUNET_free (rc->hostname);
221 GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc); 221 GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc);
222 cache_size--; 222 cache_size--;
223 GNUNET_free (rc); 223 GNUNET_free (rc);
@@ -241,7 +241,7 @@ free_hosts_entry (struct ResolveCache *rc)
241 GNUNET_free (pos->record); 241 GNUNET_free (pos->record);
242 GNUNET_free (pos); 242 GNUNET_free (pos);
243 } 243 }
244 GNUNET_free_non_null (rc->hostname); 244 GNUNET_free (rc->hostname);
245 GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc); 245 GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc);
246 cache_size--; 246 cache_size--;
247 GNUNET_free (rc); 247 GNUNET_free (rc);
@@ -267,7 +267,7 @@ free_active_lookup (struct ActiveLookup *al)
267 GNUNET_SCHEDULER_cancel (al->timeout_task); 267 GNUNET_SCHEDULER_cancel (al->timeout_task);
268 al->timeout_task = NULL; 268 al->timeout_task = NULL;
269 } 269 }
270 GNUNET_free_non_null (al->hostname); 270 GNUNET_free (al->hostname);
271 GNUNET_free (al); 271 GNUNET_free (al);
272} 272}
273 273
@@ -1094,7 +1094,7 @@ handle_get (void *cls, const struct GNUNET_RESOLVER_GetMessage *msg)
1094 client_request_id, 1094 client_request_id,
1095 client); 1095 client);
1096 } 1096 }
1097 GNUNET_free_non_null (hostname); 1097 GNUNET_free (hostname);
1098} 1098}
1099 1099
1100 1100
@@ -1115,7 +1115,7 @@ shutdown_task (void *cls)
1115 while (NULL != hosts_head) 1115 while (NULL != hosts_head)
1116 free_hosts_entry (hosts_head); 1116 free_hosts_entry (hosts_head);
1117 GNUNET_DNSSTUB_stop (dnsstub_ctx); 1117 GNUNET_DNSSTUB_stop (dnsstub_ctx);
1118 GNUNET_free_non_null (my_domain); 1118 GNUNET_free (my_domain);
1119} 1119}
1120 1120
1121 1121
@@ -1296,7 +1296,7 @@ init_cb (void *cls,
1296 GNUNET_OK == result ? "success" : "failure"); 1296 GNUNET_OK == result ? "success" : "failure");
1297 GNUNET_free (dns_servers[i]); 1297 GNUNET_free (dns_servers[i]);
1298 } 1298 }
1299 GNUNET_free_non_null (dns_servers); 1299 GNUNET_free (dns_servers);
1300} 1300}
1301 1301
1302 1302
diff --git a/src/util/mq.c b/src/util/mq.c
index 78dc7dba2..302b310de 100644
--- a/src/util/mq.c
+++ b/src/util/mq.c
@@ -881,7 +881,7 @@ GNUNET_MQ_destroy (struct GNUNET_MQ_Handle *mq)
881 GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map); 881 GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map);
882 mq->assoc_map = NULL; 882 mq->assoc_map = NULL;
883 } 883 }
884 GNUNET_free_non_null (mq->handlers); 884 GNUNET_free (mq->handlers);
885 GNUNET_free (mq); 885 GNUNET_free (mq);
886} 886}
887 887
diff --git a/src/util/network.c b/src/util/network.c
index 223ce2080..b18030fcd 100644
--- a/src/util/network.c
+++ b/src/util/network.c
@@ -621,7 +621,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc)
621void 621void
622GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc) 622GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc)
623{ 623{
624 GNUNET_free_non_null (desc->addr); 624 GNUNET_free (desc->addr);
625 GNUNET_free (desc); 625 GNUNET_free (desc);
626} 626}
627 627
diff --git a/src/util/os_installation.c b/src/util/os_installation.c
index 714df6957..34b88d761 100644
--- a/src/util/os_installation.c
+++ b/src/util/os_installation.c
@@ -563,11 +563,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
563 (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) 563 (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES)))
564 { 564 {
565 GNUNET_free (execpath); 565 GNUNET_free (execpath);
566 GNUNET_free_non_null (dirname); 566 GNUNET_free (dirname);
567 return tmp; 567 return tmp;
568 } 568 }
569 GNUNET_free (tmp); 569 GNUNET_free (tmp);
570 GNUNET_free_non_null (dirname); 570 GNUNET_free (dirname);
571 } 571 }
572 GNUNET_asprintf (&dirname, 572 GNUNET_asprintf (&dirname,
573 DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR, 573 DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR,
@@ -643,11 +643,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
643 (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES))) 643 (GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES)))
644 { 644 {
645 GNUNET_free (execpath); 645 GNUNET_free (execpath);
646 GNUNET_free_non_null (dirname); 646 GNUNET_free (dirname);
647 return tmp; 647 return tmp;
648 } 648 }
649 GNUNET_free (tmp); 649 GNUNET_free (tmp);
650 GNUNET_free_non_null (dirname); 650 GNUNET_free (dirname);
651 } 651 }
652 GNUNET_asprintf (&dirname, 652 GNUNET_asprintf (&dirname,
653 DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR 653 DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR
diff --git a/src/util/program.c b/src/util/program.c
index 5ad069edd..8bda34b4f 100644
--- a/src/util/program.c
+++ b/src/util/program.c
@@ -342,10 +342,10 @@ GNUNET_PROGRAM_run2 (int argc,
342 ret = GNUNET_OK; 342 ret = GNUNET_OK;
343cleanup: 343cleanup:
344 GNUNET_CONFIGURATION_destroy (cfg); 344 GNUNET_CONFIGURATION_destroy (cfg);
345 GNUNET_free_non_null (cc.cfgfile); 345 GNUNET_free (cc.cfgfile);
346 GNUNET_free_non_null (cfg_fn); 346 GNUNET_free (cfg_fn);
347 GNUNET_free_non_null (loglev); 347 GNUNET_free (loglev);
348 GNUNET_free_non_null (logfile); 348 GNUNET_free (logfile);
349 return ret; 349 return ret;
350} 350}
351 351
diff --git a/src/util/regex.c b/src/util/regex.c
index d3ab35652..fed325cd6 100644
--- a/src/util/regex.c
+++ b/src/util/regex.c
@@ -174,10 +174,10 @@ num_to_regex (uint16_t value,
174 GNUNET_asprintf (&ret, 174 GNUNET_asprintf (&ret,
175 "%s%s%s%s", 175 "%s%s%s%s",
176 a, b, c, d); 176 a, b, c, d);
177 GNUNET_free_non_null (a); 177 GNUNET_free (a);
178 GNUNET_free_non_null (b); 178 GNUNET_free (b);
179 GNUNET_free_non_null (c); 179 GNUNET_free (c);
180 GNUNET_free_non_null (d); 180 GNUNET_free (d);
181 return ret; 181 return ret;
182} 182}
183 183
@@ -607,7 +607,7 @@ address_to_regex (const void *addr,
607 reg = num_to_regex (a[i], m[i]); 607 reg = num_to_regex (a[i], m[i]);
608 if (NULL == reg) 608 if (NULL == reg)
609 { 609 {
610 GNUNET_free_non_null (ret); 610 GNUNET_free (ret);
611 return NULL; 611 return NULL;
612 } 612 }
613 if (NULL == ret) 613 if (NULL == ret)
@@ -721,7 +721,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
721 line = ipv4_to_regex (&np[i]); 721 line = ipv4_to_regex (&np[i]);
722 if (NULL == line) 722 if (NULL == line)
723 { 723 {
724 GNUNET_free_non_null (reg); 724 GNUNET_free (reg);
725 GNUNET_free (np); 725 GNUNET_free (np);
726 return NULL; 726 return NULL;
727 } 727 }
@@ -777,7 +777,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
777 line = ipv6_to_regex (&np[i]); 777 line = ipv6_to_regex (&np[i]);
778 if (NULL == line) 778 if (NULL == line)
779 { 779 {
780 GNUNET_free_non_null (reg); 780 GNUNET_free (reg);
781 GNUNET_free (np); 781 GNUNET_free (np);
782 return NULL; 782 return NULL;
783 } 783 }
diff --git a/src/util/service.c b/src/util/service.c
index ea078b19b..1b80c8d13 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1144,7 +1144,7 @@ get_server_addresses (const char *service_name,
1144 (EACCES == errno)) 1144 (EACCES == errno))
1145 { 1145 {
1146 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); 1146 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
1147 GNUNET_free_non_null (hostname); 1147 GNUNET_free (hostname);
1148 GNUNET_free (unixpath); 1148 GNUNET_free (unixpath);
1149 return GNUNET_SYSERR; 1149 return GNUNET_SYSERR;
1150 } 1150 }
@@ -1170,7 +1170,7 @@ get_server_addresses (const char *service_name,
1170 _ ( 1170 _ (
1171 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 1171 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
1172 service_name); 1172 service_name);
1173 GNUNET_free_non_null (hostname); 1173 GNUNET_free (hostname);
1174 return GNUNET_SYSERR; 1174 return GNUNET_SYSERR;
1175 } 1175 }
1176 if (0 == port) 1176 if (0 == port)
@@ -1178,8 +1178,8 @@ get_server_addresses (const char *service_name,
1178 saddrs = GNUNET_new_array (2, struct sockaddr *); 1178 saddrs = GNUNET_new_array (2, struct sockaddr *);
1179 saddrlens = GNUNET_new_array (2, socklen_t); 1179 saddrlens = GNUNET_new_array (2, socklen_t);
1180 add_unixpath (saddrs, saddrlens, unixpath); 1180 add_unixpath (saddrs, saddrlens, unixpath);
1181 GNUNET_free_non_null (unixpath); 1181 GNUNET_free (unixpath);
1182 GNUNET_free_non_null (hostname); 1182 GNUNET_free (hostname);
1183 *addrs = saddrs; 1183 *addrs = saddrs;
1184 *addr_lens = saddrlens; 1184 *addr_lens = saddrlens;
1185 return 1; 1185 return 1;
@@ -1203,7 +1203,7 @@ get_server_addresses (const char *service_name,
1203 hostname, 1203 hostname,
1204 gai_strerror (ret)); 1204 gai_strerror (ret));
1205 GNUNET_free (hostname); 1205 GNUNET_free (hostname);
1206 GNUNET_free_non_null (unixpath); 1206 GNUNET_free (unixpath);
1207 return GNUNET_SYSERR; 1207 return GNUNET_SYSERR;
1208 } 1208 }
1209 next = res; 1209 next = res;
@@ -1223,7 +1223,7 @@ get_server_addresses (const char *service_name,
1223 hostname); 1223 hostname);
1224 freeaddrinfo (res); 1224 freeaddrinfo (res);
1225 GNUNET_free (hostname); 1225 GNUNET_free (hostname);
1226 GNUNET_free_non_null (unixpath); 1226 GNUNET_free (unixpath);
1227 return GNUNET_SYSERR; 1227 return GNUNET_SYSERR;
1228 } 1228 }
1229 resi = i; 1229 resi = i;
@@ -1330,7 +1330,7 @@ get_server_addresses (const char *service_name,
1330 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 1330 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
1331 } 1331 }
1332 } 1332 }
1333 GNUNET_free_non_null (unixpath); 1333 GNUNET_free (unixpath);
1334 *addrs = saddrs; 1334 *addrs = saddrs;
1335 *addr_lens = saddrlens; 1335 *addr_lens = saddrlens;
1336 return resi; 1336 return resi;
@@ -1557,8 +1557,8 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
1557 } 1557 }
1558 GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); 1558 GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc);
1559 } 1559 }
1560 GNUNET_free_non_null (addrlens); 1560 GNUNET_free (addrlens);
1561 GNUNET_free_non_null (addrs); 1561 GNUNET_free (addrs);
1562 if ((0 != num) && (NULL == sh->slc_head)) 1562 if ((0 != num) && (NULL == sh->slc_head))
1563 { 1563 {
1564 /* All attempts to bind failed, hard failure */ 1564 /* All attempts to bind failed, hard failure */
@@ -1566,7 +1566,7 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
1566 GNUNET_ERROR_TYPE_ERROR, 1566 GNUNET_ERROR_TYPE_ERROR,
1567 _ ( 1567 _ (
1568 "Could not bind to any of the ports I was supposed to, refusing to run!\n")); 1568 "Could not bind to any of the ports I was supposed to, refusing to run!\n"));
1569 GNUNET_free_non_null (csocks); 1569 GNUNET_free (csocks);
1570 return GNUNET_SYSERR; 1570 return GNUNET_SYSERR;
1571 } 1571 }
1572 } 1572 }
@@ -1793,10 +1793,10 @@ teardown_service (struct GNUNET_SERVICE_Handle *sh)
1793{ 1793{
1794 struct ServiceListenContext *slc; 1794 struct ServiceListenContext *slc;
1795 1795
1796 GNUNET_free_non_null (sh->v4_denied); 1796 GNUNET_free (sh->v4_denied);
1797 GNUNET_free_non_null (sh->v6_denied); 1797 GNUNET_free (sh->v6_denied);
1798 GNUNET_free_non_null (sh->v4_allowed); 1798 GNUNET_free (sh->v4_allowed);
1799 GNUNET_free_non_null (sh->v6_allowed); 1799 GNUNET_free (sh->v6_allowed);
1800 while (NULL != (slc = sh->slc_head)) 1800 while (NULL != (slc = sh->slc_head))
1801 { 1801 {
1802 GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc); 1802 GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc);
@@ -1890,7 +1890,7 @@ GNUNET_SERVICE_start (const char *service_name,
1890 sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); 1890 sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL);
1891 if (GNUNET_OK != setup_service (sh)) 1891 if (GNUNET_OK != setup_service (sh))
1892 { 1892 {
1893 GNUNET_free_non_null (sh->handlers); 1893 GNUNET_free (sh->handlers);
1894 GNUNET_free (sh); 1894 GNUNET_free (sh);
1895 return NULL; 1895 return NULL;
1896 } 1896 }
@@ -1913,7 +1913,7 @@ GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Handle *srv)
1913 while (NULL != (client = srv->clients_head)) 1913 while (NULL != (client = srv->clients_head))
1914 GNUNET_SERVICE_client_drop (client); 1914 GNUNET_SERVICE_client_drop (client);
1915 teardown_service (srv); 1915 teardown_service (srv);
1916 GNUNET_free_non_null (srv->handlers); 1916 GNUNET_free (srv->handlers);
1917 GNUNET_free (srv); 1917 GNUNET_free (srv);
1918} 1918}
1919 1919
@@ -2159,13 +2159,13 @@ shutdown:
2159 } 2159 }
2160#endif 2160#endif
2161 teardown_service (&sh); 2161 teardown_service (&sh);
2162 GNUNET_free_non_null (sh.handlers); 2162 GNUNET_free (sh.handlers);
2163 GNUNET_SPEEDUP_stop_ (); 2163 GNUNET_SPEEDUP_stop_ ();
2164 GNUNET_CONFIGURATION_destroy (cfg); 2164 GNUNET_CONFIGURATION_destroy (cfg);
2165 GNUNET_free_non_null (logfile); 2165 GNUNET_free (logfile);
2166 GNUNET_free_non_null (loglev); 2166 GNUNET_free (loglev);
2167 GNUNET_free (cfg_filename); 2167 GNUNET_free (cfg_filename);
2168 GNUNET_free_non_null (opt_cfg_filename); 2168 GNUNET_free (opt_cfg_filename);
2169 2169
2170 return err ? GNUNET_SYSERR : sh.ret; 2170 return err ? GNUNET_SYSERR : sh.ret;
2171} 2171}
diff --git a/src/util/socks.c b/src/util/socks.c
index 756be753a..7ab297272 100644
--- a/src/util/socks.c
+++ b/src/util/socks.c
@@ -665,7 +665,7 @@ GNUNET_SOCKS_do_connect (const char *service_name,
665 (host0 != NULL) ? host0 665 (host0 != NULL) ? host0
666 : "127.0.0.1", 666 : "127.0.0.1",
667 port0); 667 port0);
668 GNUNET_free_non_null (host0); 668 GNUNET_free (host0);
669 669
670 /* Sets to NULL if they do not exist */ 670 /* Sets to NULL if they do not exist */
671 (void) GNUNET_CONFIGURATION_get_value_string (cfg, 671 (void) GNUNET_CONFIGURATION_get_value_string (cfg,
@@ -677,8 +677,8 @@ GNUNET_SOCKS_do_connect (const char *service_name,
677 "SOCKSPASS", 677 "SOCKSPASS",
678 &pass); 678 &pass);
679 ih = GNUNET_SOCKS_init_handshake (user, pass); 679 ih = GNUNET_SOCKS_init_handshake (user, pass);
680 GNUNET_free_non_null (user); 680 GNUNET_free (user);
681 GNUNET_free_non_null (pass); 681 GNUNET_free (pass);
682 682
683 GNUNET_SOCKS_set_handshake_destination (ih, host1, port1); 683 GNUNET_SOCKS_set_handshake_destination (ih, host1, port1);
684 GNUNET_free (host1); 684 GNUNET_free (host1);
diff --git a/src/util/strings.c b/src/util/strings.c
index 9510b3b3b..5148d0368 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -1148,7 +1148,7 @@ GNUNET_STRINGS_path_is_absolute (const char *filename,
1148 if (r_uri_scheme) 1148 if (r_uri_scheme)
1149 *r_uri_scheme = uri; 1149 *r_uri_scheme = uri;
1150 else 1150 else
1151 GNUNET_free_non_null (uri); 1151 GNUNET_free (uri);
1152 1152
1153 return GNUNET_STRINGS_path_is_absolute (post_scheme_path, 1153 return GNUNET_STRINGS_path_is_absolute (post_scheme_path,
1154 GNUNET_NO, 1154 GNUNET_NO,
diff --git a/src/util/test_common_allocation.c b/src/util/test_common_allocation.c
index a24af7124..da3d2f470 100644
--- a/src/util/test_common_allocation.c
+++ b/src/util/test_common_allocation.c
@@ -55,9 +55,9 @@ check (void)
55 GNUNET_free (ptrs[i]); 55 GNUNET_free (ptrs[i]);
56 } 56 }
57 57
58 /* GNUNET_free_non_null test */ 58 /* GNUNET_free test */
59 GNUNET_free_non_null (NULL); 59 GNUNET_free (NULL);
60 GNUNET_free_non_null (GNUNET_malloc (4)); 60 GNUNET_free (GNUNET_malloc (4));
61 61
62 /* GNUNET_strdup tests */ 62 /* GNUNET_strdup tests */
63 ptrs[0] = GNUNET_strdup ("bar"); 63 ptrs[0] = GNUNET_strdup ("bar");
diff --git a/src/util/test_configuration.c b/src/util/test_configuration.c
index 6227a28db..59b1b2291 100644
--- a/src/util/test_configuration.c
+++ b/src/util/test_configuration.c
@@ -128,7 +128,7 @@ diffsCallBack (void *cls, const char *section, const char *option,
128 } 128 }
129 else 129 else
130 cbData->status = 1; 130 cbData->status = 1;
131 GNUNET_free_non_null (diffValue); 131 GNUNET_free (diffValue);
132 break; 132 break;
133 } 133 }
134 134
diff --git a/src/util/test_container_meta_data.c b/src/util/test_container_meta_data.c
index d768f3699..db413f313 100644
--- a/src/util/test_container_meta_data.c
+++ b/src/util/test_container_meta_data.c
@@ -113,7 +113,7 @@ testMeta (int i)
113 GNUNET_CONTAINER_meta_data_serialize (m, &sval, size, 113 GNUNET_CONTAINER_meta_data_serialize (m, &sval, size,
114 GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL)) 114 GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL))
115 { 115 {
116 GNUNET_free_non_null (sval); 116 GNUNET_free (sval);
117 ABORT (m); 117 ABORT (m);
118 } 118 }
119 GNUNET_CONTAINER_meta_data_destroy (m); 119 GNUNET_CONTAINER_meta_data_destroy (m);
diff --git a/src/util/test_crypto_symmetric.c b/src/util/test_crypto_symmetric.c
index 9f6cd5ed0..5012c7f5b 100644
--- a/src/util/test_crypto_symmetric.c
+++ b/src/util/test_crypto_symmetric.c
@@ -147,7 +147,7 @@ verifyCrypto ()
147 ret = 1; 147 ret = 1;
148 } 148 }
149error: 149error:
150 GNUNET_free_non_null (res); 150 GNUNET_free (res);
151 return ret; 151 return ret;
152} 152}
153 153
diff --git a/src/util/test_resolver_api.c b/src/util/test_resolver_api.c
index 13fda53bf..05716741e 100644
--- a/src/util/test_resolver_api.c
+++ b/src/util/test_resolver_api.c
@@ -215,7 +215,7 @@ run (void *cls, char *const *args, const char *cfgfile,
215 own_fqdn = GNUNET_RESOLVER_local_fqdn_get (); 215 own_fqdn = GNUNET_RESOLVER_local_fqdn_get ();
216 /* can't really check, only thing we can safely 216 /* can't really check, only thing we can safely
217 compare against is our own identical logic... */ 217 compare against is our own identical logic... */
218 GNUNET_free_non_null (own_fqdn); 218 GNUNET_free (own_fqdn);
219 219
220 /* 220 /*
221 * Testing non-local DNS resolution 221 * Testing non-local DNS resolution
diff --git a/src/vpn/gnunet-service-vpn.c b/src/vpn/gnunet-service-vpn.c
index 62bc45e41..4c57438c3 100644
--- a/src/vpn/gnunet-service-vpn.c
+++ b/src/vpn/gnunet-service-vpn.c
@@ -2882,7 +2882,7 @@ cleanup (void *cls)
2882 stats = NULL; 2882 stats = NULL;
2883 } 2883 }
2884 for (i = 0; i < 5; i++) 2884 for (i = 0; i < 5; i++)
2885 GNUNET_free_non_null (vpn_argv[i]); 2885 GNUNET_free (vpn_argv[i]);
2886} 2886}
2887 2887
2888 2888
@@ -3008,7 +3008,7 @@ run (void *cls,
3008 _ ("Must specify valid IPv6 address")); 3008 _ ("Must specify valid IPv6 address"));
3009 GNUNET_free (binary); 3009 GNUNET_free (binary);
3010 GNUNET_SCHEDULER_shutdown (); 3010 GNUNET_SCHEDULER_shutdown ();
3011 GNUNET_free_non_null (ipv6addr); 3011 GNUNET_free (ipv6addr);
3012 return; 3012 return;
3013 } 3013 }
3014 vpn_argv[2] = ipv6addr; 3014 vpn_argv[2] = ipv6addr;
@@ -3020,7 +3020,7 @@ run (void *cls,
3020 { 3020 {
3021 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "VPN", "IPV6PREFIX"); 3021 GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "VPN", "IPV6PREFIX");
3022 GNUNET_SCHEDULER_shutdown (); 3022 GNUNET_SCHEDULER_shutdown ();
3023 GNUNET_free_non_null (ipv6prefix_s); 3023 GNUNET_free (ipv6prefix_s);
3024 return; 3024 return;
3025 } 3025 }
3026 vpn_argv[3] = ipv6prefix_s; 3026 vpn_argv[3] = ipv6prefix_s;
@@ -3062,7 +3062,7 @@ run (void *cls,
3062 _ ("Must specify valid IPv4 address")); 3062 _ ("Must specify valid IPv4 address"));
3063 GNUNET_free (binary); 3063 GNUNET_free (binary);
3064 GNUNET_SCHEDULER_shutdown (); 3064 GNUNET_SCHEDULER_shutdown ();
3065 GNUNET_free_non_null (ipv4addr); 3065 GNUNET_free (ipv4addr);
3066 return; 3066 return;
3067 } 3067 }
3068 vpn_argv[4] = ipv4addr; 3068 vpn_argv[4] = ipv4addr;
@@ -3079,7 +3079,7 @@ run (void *cls,
3079 _ ("Must specify valid IPv4 mask")); 3079 _ ("Must specify valid IPv4 mask"));
3080 GNUNET_free (binary); 3080 GNUNET_free (binary);
3081 GNUNET_SCHEDULER_shutdown (); 3081 GNUNET_SCHEDULER_shutdown ();
3082 GNUNET_free_non_null (ipv4mask); 3082 GNUNET_free (ipv4mask);
3083 return; 3083 return;
3084 } 3084 }
3085 vpn_argv[5] = ipv4mask; 3085 vpn_argv[5] = ipv4mask;
diff --git a/src/vpn/gnunet-vpn.c b/src/vpn/gnunet-vpn.c
index a7f7fc30c..60d631d5e 100644
--- a/src/vpn/gnunet-vpn.c
+++ b/src/vpn/gnunet-vpn.c
@@ -107,9 +107,9 @@ do_disconnect (void *cls)
107 GNUNET_VPN_disconnect (handle); 107 GNUNET_VPN_disconnect (handle);
108 handle = NULL; 108 handle = NULL;
109 } 109 }
110 GNUNET_free_non_null (peer_id); 110 GNUNET_free (peer_id);
111 GNUNET_free_non_null (service_name); 111 GNUNET_free (service_name);
112 GNUNET_free_non_null (target_ip); 112 GNUNET_free (target_ip);
113} 113}
114 114
115 115