summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
GNUNET_free (dele);
printf ("%s\n", res);
- GNUNET_free_non_null (ego_name);
+ GNUNET_free (ego_name);
ego_name = NULL;
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)
static void
cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry)
{
- GNUNET_free_non_null (ds_entry->issuer_key);
- GNUNET_free_non_null (ds_entry->issuer_attribute);
- GNUNET_free_non_null (ds_entry->attr_trailer);
+ GNUNET_free (ds_entry->issuer_key);
+ GNUNET_free (ds_entry->issuer_attribute);
+ GNUNET_free (ds_entry->attr_trailer);
// those fields are only set/used in bw search
if (ds_entry->from_bw)
{
- GNUNET_free_non_null (ds_entry->lookup_attribute);
- GNUNET_free_non_null (ds_entry->unresolved_attribute_delegation);
+ GNUNET_free (ds_entry->lookup_attribute);
+ GNUNET_free (ds_entry->unresolved_attribute_delegation);
}
if (NULL != ds_entry->lookup_request)
{
@@ -380,9 +380,9 @@ cleanup_dsq_entry (struct DelegationSetQueueEntry *ds_entry)
}
if (NULL != ds_entry->delegation_chain_entry)
{
- GNUNET_free_non_null (
+ GNUNET_free (
ds_entry->delegation_chain_entry->subject_attribute);
- GNUNET_free_non_null (ds_entry->delegation_chain_entry->issuer_attribute);
+ GNUNET_free (ds_entry->delegation_chain_entry->issuer_attribute);
GNUNET_free (ds_entry->delegation_chain_entry);
}
// Free DQ entries
@@ -423,11 +423,11 @@ cleanup_handle (struct VerifyRequestHandle *vrh)
GNUNET_CONTAINER_DLL_remove (vrh->del_chain_head,
vrh->del_chain_tail,
del_entry);
- GNUNET_free_non_null (del_entry->delegate);
+ GNUNET_free (del_entry->delegate);
GNUNET_free (del_entry);
}
}
- GNUNET_free_non_null (vrh->issuer_attribute);
+ GNUNET_free (vrh->issuer_attribute);
GNUNET_free (vrh);
}
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,
}
GNUNET_free (binary);
GNUNET_free (quotedbinary);
- GNUNET_free_non_null (config);
+ GNUNET_free (config);
GNUNET_free (loprefix);
GNUNET_free (lopostfix);
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,
(EACCES == errno))
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
@@ -504,7 +504,7 @@ get_server_addresses (const char *service_name,
_ (
"Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
service_name);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return GNUNET_SYSERR;
}
if (0 == port)
@@ -512,8 +512,8 @@ get_server_addresses (const char *service_name,
saddrs = GNUNET_new_array (2, struct sockaddr *);
saddrlens = GNUNET_new_array (2, socklen_t);
add_unixpath (saddrs, saddrlens, unixpath, abstract);
- GNUNET_free_non_null (unixpath);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (unixpath);
+ GNUNET_free (hostname);
*addrs = saddrs;
*addr_lens = saddrlens;
return 1;
@@ -537,7 +537,7 @@ get_server_addresses (const char *service_name,
hostname,
gai_strerror (ret));
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
next = res;
@@ -557,7 +557,7 @@ get_server_addresses (const char *service_name,
hostname);
freeaddrinfo (res);
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
resi = i;
@@ -664,7 +664,7 @@ get_server_addresses (const char *service_name,
((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
}
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
*addrs = saddrs;
*addr_lens = saddrlens;
return resi;
@@ -1132,8 +1132,8 @@ free_service (struct ServiceList *sl)
GNUNET_assert (GNUNET_YES == in_shutdown);
GNUNET_CONTAINER_DLL_remove (running_head, running_tail, sl);
GNUNET_assert (NULL == sl->listen_head);
- GNUNET_free_non_null (sl->config);
- GNUNET_free_non_null (sl->binary);
+ GNUNET_free (sl->config);
+ GNUNET_free (sl->binary);
GNUNET_free (sl->name);
GNUNET_free (sl);
}
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)
GNUNET_free (cur);
}
- GNUNET_free_non_null (e->name);
- GNUNET_free_non_null (e->cfg_file);
+ GNUNET_free (e->name);
+ GNUNET_free (e->cfg_file);
GNUNET_free (e);
}
@@ -332,7 +332,7 @@ load_episode (struct Experiment *e,
GNUNET_free (type);
GNUNET_free (op_name);
GNUNET_free (op);
- GNUNET_free_non_null (pref);
+ GNUNET_free (pref);
GNUNET_free (o);
GNUNET_free (sec_name);
return GNUNET_SYSERR;
@@ -350,7 +350,7 @@ load_episode (struct Experiment *e,
GNUNET_free (type);
GNUNET_free (op_name);
GNUNET_free (op);
- GNUNET_free_non_null (pref);
+ GNUNET_free (pref);
GNUNET_free (o);
GNUNET_free (sec_name);
return GNUNET_SYSERR;
@@ -384,7 +384,7 @@ load_episode (struct Experiment *e,
fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n",
op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id);
- GNUNET_free_non_null (type);
+ GNUNET_free (type);
GNUNET_free (op);
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)
GNUNET_TESTBED_operation_done (p->comm_op);
p->comm_op = NULL;
}
- GNUNET_free_non_null (p->core_connect_ops);
+ GNUNET_free (p->core_connect_ops);
GNUNET_free (p->partners);
p->partners = NULL;
}
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[])
{
if ((c < (argc - 1)) && (0 == strcmp (argv[c], "-e")))
{
- GNUNET_free_non_null (opt_exp_file);
+ GNUNET_free (opt_exp_file);
opt_exp_file = GNUNET_strdup (argv[c + 1]);
}
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)
GNUNET_free (cur);
}
- GNUNET_free_non_null (e->name);
- GNUNET_free_non_null (e->cfg_file);
+ GNUNET_free (e->name);
+ GNUNET_free (e->cfg_file);
GNUNET_free (e);
}
@@ -344,7 +344,7 @@ load_episode (struct Experiment *e,
GNUNET_free (op_name);
GNUNET_free (op);
GNUNET_free (sec_name);
- GNUNET_free_non_null (pref);
+ GNUNET_free (pref);
GNUNET_free (o);
return GNUNET_SYSERR;
}
@@ -364,7 +364,7 @@ load_episode (struct Experiment *e,
GNUNET_free (op_name);
GNUNET_free (op);
GNUNET_free (sec_name);
- GNUNET_free_non_null (pref);
+ GNUNET_free (pref);
GNUNET_free (o);
return GNUNET_SYSERR;
}
@@ -397,7 +397,7 @@ load_episode (struct Experiment *e,
fprintf (stderr, "Found operation %u in episode %u: %s [%llu]->[%llu]\n",
op_counter, cur->id, print_op (o->type), o->src_id, o->dest_id);
- GNUNET_free_non_null (type);
+ GNUNET_free (type);
GNUNET_free (op);
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)
options,
&run,
NULL);
- GNUNET_free_non_null (opt_pid_str);
- GNUNET_free_non_null (opt_type_str);
+ GNUNET_free (opt_pid_str);
+ GNUNET_free (opt_type_str);
GNUNET_free_nz ((void *) argv);
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)
for (cur_o = next_o; NULL != cur_o; cur_o = next_o)
{
next_o = cur_o->next;
- GNUNET_free_non_null (cur_o->address);
- GNUNET_free_non_null (cur_o->plugin);
+ GNUNET_free (cur_o->address);
+ GNUNET_free (cur_o->plugin);
GNUNET_free (cur_o);
}
GNUNET_free (cur);
}
- GNUNET_free_non_null (e->name);
- GNUNET_free_non_null (e->log_prefix);
- GNUNET_free_non_null (e->log_output_dir);
- GNUNET_free_non_null (e->cfg_file);
+ GNUNET_free (e->name);
+ GNUNET_free (e->log_prefix);
+ GNUNET_free (e->log_output_dir);
+ GNUNET_free (e->cfg_file);
GNUNET_free (e);
}
@@ -1967,7 +1967,7 @@ load_op_start_set_property (struct GNUNET_ATS_TEST_Operation *o,
fprintf (stderr, "Missing property in operation %u `%s' in episode %u\n",
op_counter, op_name, e->id);
GNUNET_free (op_name);
- GNUNET_free_non_null (prop);
+ GNUNET_free (prop);
return GNUNET_SYSERR;
}
@@ -2038,7 +2038,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
fprintf (stderr, "Missing property in operation %u `%s' in episode `%s'\n",
op_counter, "STOP_SET_PROPERTY", op_name);
GNUNET_free (op_name);
- GNUNET_free_non_null (pref);
+ GNUNET_free (pref);
return GNUNET_SYSERR;
}
@@ -2047,7 +2047,7 @@ load_op_stop_set_property (struct GNUNET_ATS_TEST_Operation *o,
fprintf (stderr, "Invalid property in operation %u `%s' in episode %u\n",
op_counter, op_name, e->id);
GNUNET_free (op_name);
- GNUNET_free_non_null (pref);
+ GNUNET_free (pref);
return GNUNET_SYSERR;
}
@@ -2419,7 +2419,7 @@ enforce_del_address (struct GNUNET_ATS_TEST_Operation *op)
}
GNUNET_CONTAINER_DLL_remove (p->addr_head, p->addr_tail, a);
- GNUNET_free_non_null (a->ats_addr->atsi);
+ GNUNET_free (a->ats_addr->atsi);
GNUNET_free (a->ats_addr);
GNUNET_free (a);
}
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)
ph.stat = NULL;
}
- GNUNET_free_non_null (ph.peers);
- GNUNET_free_non_null (ph.iterations_results);
+ GNUNET_free (ph.peers);
+ GNUNET_free (ph.iterations_results);
GAS_normalization_stop ();
GAS_preference_done ();
@@ -1090,13 +1090,13 @@ write_all_iterations (void)
if ((NULL != f_full) && (GNUNET_SYSERR == GNUNET_DISK_file_close (f_full)))
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n",
data_fn_full);
- GNUNET_free_non_null (data_fn_full);
+ GNUNET_free (data_fn_full);
if ((NULL != f_update) && (GNUNET_SYSERR == GNUNET_DISK_file_close (
f_update)))
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Cannot close log file `%s'\n",
data_fn_update);
- GNUNET_free_non_null (data_fn_update);
+ GNUNET_free (data_fn_update);
}
@@ -1115,7 +1115,7 @@ do_delete_address (void *cls,
pid,
cur));
ph.sf->s_del (ph.sf->cls, cur);
- GNUNET_free_non_null (cur->atsi);
+ GNUNET_free (cur->atsi);
GNUNET_free (cur);
return GNUNET_OK;
}
@@ -1427,7 +1427,7 @@ run (void *cls, char *const *args, const char *cfgfile,
if (0 == c2)
continue;
if (ph.measure_updates)
- GNUNET_free_non_null (
+ GNUNET_free (
ph.iterations_results[c].update_results_array[c2]);
GNUNET_free (ph.iterations_results[c].results_array[c2]);
}
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)
GNUNET_CONTAINER_DLL_remove (s->network_entries[c].head,
s->network_entries[c].tail,
cur);
- GNUNET_free_non_null (cur->addr->solver_information);
+ GNUNET_free (cur->addr->solver_information);
GNUNET_free (cur);
}
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,
GNUNET_CONTAINER_multipeermap_remove (p2asd,
key,
asd));
- GNUNET_free_non_null (asd->address);
+ GNUNET_free (asd->address);
GNUNET_free (asd);
return GNUNET_OK;
}
@@ -951,7 +951,7 @@ address_suggest_cb (void *cls,
asd->bandwidth_out = bandwidth_out;
asd->bandwidth_in = bandwidth_in;
asd->session = session;
- GNUNET_free_non_null (asd->address);
+ GNUNET_free (asd->address);
asd->address = NULL;
if (NULL != address)
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)
msg->port = p->id;
GNUNET_MQ_send (p->cadet->mq, env);
}
- GNUNET_free_non_null (p->handlers);
+ GNUNET_free (p->handlers);
GNUNET_free (p);
}
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 ()
}
GCD_shutdown ();
GCH_shutdown ();
- GNUNET_free_non_null (my_private_key);
+ GNUNET_free (my_private_key);
my_private_key = NULL;
}
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,
if (0 == GNUNET_memcmp (id,
&my_full_id))
{
- GNUNET_free_non_null (mine);
+ GNUNET_free (mine);
mine = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (&hello->header);
GCD_hello_update ();
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)
GNUNET_CONTAINER_multipeermap_remove (peers,
&cp->pid,
cp));
- GNUNET_free_non_null (cp->path_heads);
- GNUNET_free_non_null (cp->path_tails);
+ GNUNET_free (cp->path_heads);
+ GNUNET_free (cp->path_tails);
cp->path_dll_length = 0;
if (NULL != cp->search_h)
{
@@ -376,7 +376,7 @@ destroy_peer (void *cls)
GNUNET_SCHEDULER_cancel (cp->heap_cleanup_task);
cp->heap_cleanup_task = NULL;
}
- GNUNET_free_non_null (cp->hello);
+ GNUNET_free (cp->hello);
/* Peer should not be freed if paths exist; if there are no paths,
there ought to be no connections, and without connections, no
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:
evil->type = EVILNESS_NONE;
cleanup:
GNUNET_free (evil_spec);
- /* no GNUNET_free_non_null since it wasn't
+ /* no GNUNET_free since it wasn't
* allocated with GNUNET_malloc */
if (NULL != evil_type_str)
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 ()
else
{
GNUNET_CONVERSATION_phone_get_record (phone, &rd);
- GNUNET_free_non_null (address);
+ GNUNET_free (address);
address =
GNUNET_GNSRECORD_value_to_string (rd.record_type, rd.data, rd.data_size);
fprintf (
@@ -1035,7 +1035,7 @@ do_stop_task (void *cls)
mic = NULL;
GNUNET_free (ego_name);
ego_name = NULL;
- GNUNET_free_non_null (peer_name);
+ GNUNET_free (peer_name);
peer_name = NULL;
phone_state = PS_ERROR;
}
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)
GNUNET_MQ_destroy (handle->mq);
handle->mq = NULL;
}
- GNUNET_free_non_null (handle->handlers);
+ GNUNET_free (handle->handlers);
GNUNET_free (handle);
}
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,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received (my) `%s' from transport service\n", "HELLO");
GNUNET_assert (message != NULL);
- GNUNET_free_non_null (p->hello);
+ GNUNET_free (p->hello);
p->hello = GNUNET_copy_message (message);
if ((p == &p1) && (NULL == p2.oh))
p2.oh = GNUNET_TRANSPORT_offer_hello (p2.cfg,
@@ -523,8 +523,8 @@ main (int argc,
&ok);
stop_arm (&p1);
stop_arm (&p2);
- GNUNET_free_non_null (p1.hello);
- GNUNET_free_non_null (p2.hello);
+ GNUNET_free (p1.hello);
+ GNUNET_free (p2.hello);
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-1");
GNUNET_DISK_directory_remove ("/tmp/test-gnunet-core-peer-2");
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)
GNUNET_break (CURLM_OK ==
curl_multi_remove_handle (ctx->multi, job->easy_handle));
curl_easy_cleanup (job->easy_handle);
- GNUNET_free_non_null (job->db.buf);
+ GNUNET_free (job->db.buf);
curl_slist_free_all (job->job_headers);
ctx->cb (ctx->cb_cls);
GNUNET_free (job);
@@ -642,7 +642,7 @@ GNUNET_CURL_download_get_result_ (struct GNUNET_CURL_DownloadBuffer *db,
*response_code = 0;
}
}
- GNUNET_free_non_null (db->buf);
+ GNUNET_free (db->buf);
db->buf = NULL;
db->buf_size = 0;
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)
plugin->env->delete_notify (plugin->env->cls,
&val->key,
val->size + OVERHEAD);
- GNUNET_free_non_null (val->path_info);
+ GNUNET_free (val->path_info);
GNUNET_free (val);
return GNUNET_OK;
}
@@ -577,7 +577,7 @@ libgnunet_plugin_datacache_heap_done (void *cls)
GNUNET_CONTAINER_multihashmap_remove (plugin->map,
&val->key,
val));
- GNUNET_free_non_null (val->path_info);
+ GNUNET_free (val->path_info);
GNUNET_free (val);
}
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)
#if ! WINDOWS || defined(__CYGWIN__)
if ((NULL != plugin->fn) && (0 != unlink (plugin->fn)))
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_WARNING, "unlink", plugin->fn);
- GNUNET_free_non_null (plugin->fn);
+ GNUNET_free (plugin->fn);
#endif
sqlite3_finalize (plugin->insert_stmt);
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)
GNUNET_SCHEDULER_cancel (stat_timeout_task);
stat_timeout_task = NULL;
}
- GNUNET_free_non_null (plugin_name);
+ GNUNET_free (plugin_name);
plugin_name = NULL;
if (last_sync > 0)
sync_stats ();
@@ -1490,7 +1490,7 @@ run (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_ ("Could not use specified filename `%s' for bloomfilter.\n"),
NULL != fn ? fn : "");
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
fn = NULL;
}
if (NULL != fn)
@@ -1566,7 +1566,7 @@ run (void *cls,
5); /* approx. 3% false positives at max use */
refresh_bf = GNUNET_YES;
}
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
if (NULL == filter)
{
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)
#endif
if (SQLITE_OK != result)
LOG_SQLITE (plugin, GNUNET_ERROR_TYPE_ERROR, "sqlite3_close");
- GNUNET_free_non_null (plugin->fn);
+ GNUNET_free (plugin->fn);
}
@@ -640,7 +640,7 @@ sqlite_plugin_put (void *cls,
GNUNET_ERROR_TYPE_ERROR | GNUNET_ERROR_TYPE_BULK,
"sqlite3_step");
cont (cont_cls, key, size, GNUNET_SYSERR, msg);
- GNUNET_free_non_null (msg);
+ GNUNET_free (msg);
return;
}
int changes = sqlite3_changes (plugin->dbh);
@@ -724,12 +724,12 @@ sqlite_plugin_put (void *cls,
database_shutdown (plugin);
database_setup (plugin->env->cfg, plugin);
cont (cont_cls, key, size, GNUNET_SYSERR, msg);
- GNUNET_free_non_null (msg);
+ GNUNET_free (msg);
return;
}
GNUNET_SQ_reset (plugin->dbh, stmt);
cont (cont_cls, key, size, ret, msg);
- GNUNET_free_non_null (msg);
+ GNUNET_free (msg);
}
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,
msg);
crc->phase = RP_ERROR;
}
- GNUNET_free_non_null (crc->data);
+ GNUNET_free (crc->data);
crc->data = NULL;
GNUNET_SCHEDULER_add_now (&run_continuation, crc);
}
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
if (GNUNET_OK != success)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", msg);
GNUNET_assert (GNUNET_OK == success);
- GNUNET_free_non_null (crc->data);
+ GNUNET_free (crc->data);
crc->data = NULL;
GNUNET_SCHEDULER_add_now (&run_continuation, crc);
}
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)
}
GNUNET_MQ_send (handle->mq,
env);
- GNUNET_free_non_null (mh->key);
+ GNUNET_free (mh->key);
GNUNET_free (mh);
}
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
process_hello (void *cls,
const struct GNUNET_MessageHeader *message)
{
- GNUNET_free_non_null (GDS_my_hello);
+ GNUNET_free (GDS_my_hello);
GDS_my_hello = GNUNET_malloc (ntohs (message->size));
GNUNET_memcpy (GDS_my_hello,
message,
@@ -106,7 +106,7 @@ shutdown_task (void *cls)
GNUNET_YES);
GDS_stats = NULL;
}
- GNUNET_free_non_null (GDS_my_hello);
+ GNUNET_free (GDS_my_hello);
GDS_my_hello = NULL;
GDS_CLIENTS_stop ();
}
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,
struct ClientMonitorRecord *next;
next = monitor->next;
- GNUNET_free_non_null (monitor->key);
+ GNUNET_free (monitor->key);
GNUNET_CONTAINER_DLL_remove (monitor_head,
monitor_tail,
monitor);
@@ -938,7 +938,7 @@ handle_dht_local_monitor_stop (void *cls,
GNUNET_CONTAINER_DLL_remove (monitor_head,
monitor_tail,
r);
- GNUNET_free_non_null (r->key);
+ GNUNET_free (r->key);
GNUNET_free (r);
return; /* Delete only ONE entry */
}
@@ -1281,7 +1281,7 @@ GDS_CLIENTS_process_get (uint32_t options,
env);
}
}
- GNUNET_free_non_null (cl);
+ GNUNET_free (cl);
}
@@ -1363,7 +1363,7 @@ GDS_CLIENTS_process_get_resp (enum GNUNET_BLOCK_Type type,
env);
}
}
- GNUNET_free_non_null (cl);
+ GNUNET_free (cl);
}
@@ -1445,7 +1445,7 @@ GDS_CLIENTS_process_put (uint32_t options,
env);
}
}
- GNUNET_free_non_null (cl);
+ GNUNET_free (cl);
}
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,
gettext_noop ("# HELLOs obtained from peerinfo"), 1,
GNUNET_NO);
hm = GNUNET_CONTAINER_multipeermap_get (peer_to_hello, peer);
- GNUNET_free_non_null (hm);
+ GNUNET_free (hm);
hm = GNUNET_malloc (GNUNET_HELLO_size (hello));
GNUNET_memcpy (hm, hello, GNUNET_HELLO_size (hello));
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,
if (msize + sizeof(struct PeerGetMessage) >= GNUNET_MAX_MESSAGE_SIZE)
{
GNUNET_break (0);
- GNUNET_free_non_null (reply_bf);
+ GNUNET_free (reply_bf);
GNUNET_free (targets);
return GNUNET_NO;
}
@@ -1493,7 +1493,7 @@ GDS_NEIGHBOURS_handle_get (enum GNUNET_BLOCK_Type type,
env);
}
GNUNET_free (targets);
- GNUNET_free_non_null (reply_bf);
+ GNUNET_free (reply_bf);
return (skip_count < target_count) ? GNUNET_OK : GNUNET_NO;
}
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)
GNUNET_TESTBED_operation_done (bandwidth_stats_op);
bandwidth_stats_op = NULL;
}
- GNUNET_free_non_null (a_ac);
+ GNUNET_free (a_ac);
}
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)
(unsigned int) (GNUNET_TIME_absolute_get_remaining (
record->expiration_time).rel_value_us / 1000LL
/ 1000LL));
- GNUNET_free_non_null (tmp);
+ GNUNET_free (tmp);
}
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,
"Injecting modified DNS response\n");
GNUNET_DNS_request_answer (rh, len, buf);
}
- GNUNET_free_non_null (buf);
+ GNUNET_free (buf);
}
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;
static void
cleanup_rr (struct RequestRecord *rr)
{
- GNUNET_free_non_null (rr->payload);
+ GNUNET_free (rr->payload);
rr->payload = NULL;
rr->payload_length = 0;
GNUNET_array_grow (rr->client_wait_list,
@@ -280,7 +280,7 @@ cleanup_task (void *cls GNUNET_UNUSED)
hijacker = NULL;
}
for (unsigned int i = 0; i < 8; i++)
- GNUNET_free_non_null (helper_argv[i]);
+ GNUNET_free (helper_argv[i]);
for (unsigned int i = 0; i <= UINT16_MAX; i++)
cleanup_rr (&requests[i]);
if (NULL != stats)
@@ -762,7 +762,7 @@ process_dns_result (void *cls,
LOG (GNUNET_ERROR_TYPE_DEBUG,
"Got a response from the stub resolver for DNS request %llu intercepted locally!\n",
(unsigned long long) rr->request_id);
- GNUNET_free_non_null (rr->payload);
+ GNUNET_free (rr->payload);
rr->payload = GNUNET_malloc (r);
GNUNET_memcpy (rr->payload,
dns,
@@ -862,7 +862,7 @@ handle_client_response (void *cls,
next_phase (rr);
return;
}
- GNUNET_free_non_null (rr->payload);
+ GNUNET_free (rr->payload);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Changing DNS reply according to client specifications\n");
rr->payload = GNUNET_malloc (msize);
@@ -1005,7 +1005,7 @@ process_helper_messages (void *cls,
rr = &requests[dns->id];
/* clean up from previous request */
- GNUNET_free_non_null (rr->payload);
+ GNUNET_free (rr->payload);
rr->payload = NULL;
GNUNET_array_grow (rr->client_wait_list,
rr->client_wait_list_length,
@@ -1115,7 +1115,7 @@ run (void *cls,
"dns",
"DNS_EXIT",
_ ("need a valid IPv4 or IPv6 address\n"));
- GNUNET_free_non_null (dns_exit);
+ GNUNET_free (dns_exit);
}
binary = GNUNET_OS_get_suid_binary_path (cfg, "gnunet-helper-dns");
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,
key,
service));
GNUNET_CADET_close_port (service->port);
- GNUNET_free_non_null (service->name);
+ GNUNET_free (service->name);
GNUNET_free (service);
return GNUNET_OK;
}
@@ -2613,7 +2613,7 @@ store_service (int proto,
GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_ONLY))
{
GNUNET_CADET_close_port (service->port);
- GNUNET_free_non_null (service->name);
+ GNUNET_free (service->name);
GNUNET_free (service);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_ ("Got duplicate service records for `%s:%u'\n"),
@@ -3340,7 +3340,7 @@ cleanup (void *cls)
stats = NULL;
}
for (i = 0; i < 8; i++)
- GNUNET_free_non_null (exit_argv[i]);
+ GNUNET_free (exit_argv[i]);
}
@@ -3706,7 +3706,7 @@ advertise_dns_exit ()
"dns",
"DNS_RESOLVER",
_ ("need a valid IPv4 or IPv6 address\n"));
- GNUNET_free_non_null (dns_exit);
+ GNUNET_free (dns_exit);
return;
}
/* open port */
@@ -3807,7 +3807,7 @@ setup_exit_helper_args ()
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"EXIT",
"IPV6ADDR");
- GNUNET_free_non_null (ipv6addr);
+ GNUNET_free (ipv6addr);
return GNUNET_SYSERR;
}
exit_argv[3] = ipv6addr;
@@ -3858,7 +3858,7 @@ setup_exit_helper_args ()
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"EXIT",
"IPV4ADDR");
- GNUNET_free_non_null (ipv4addr);
+ GNUNET_free (ipv4addr);
return GNUNET_SYSERR;
}
exit_argv[5] = ipv4addr;
@@ -3875,7 +3875,7 @@ setup_exit_helper_args ()
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"EXIT",
"IPV4MASK");
- GNUNET_free_non_null (ipv4mask);
+ GNUNET_free (ipv4mask);
return GNUNET_SYSERR;
}
exit_argv[6] = ipv4mask;
@@ -4023,7 +4023,7 @@ run (void *cls,
regex = NULL;
else
regex = GNUNET_TUN_ipv4policy2regex (policy);
- GNUNET_free_non_null (policy);
+ GNUNET_free (policy);
if (NULL != regex)
{
(void) GNUNET_asprintf (&prefixed_regex,
@@ -4063,7 +4063,7 @@ run (void *cls,
regex = NULL;
else
regex = GNUNET_TUN_ipv6policy2regex (policy);
- GNUNET_free_non_null (policy);
+ GNUNET_free (policy);
if (NULL != regex)
{
(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,
return 0;
if (0 == max)
{
- GNUNET_free_non_null (data);
+ GNUNET_free (data);
return 0;
}
GNUNET_memcpy (buf, &data[offset], max);
@@ -1132,15 +1132,15 @@ deserialize_fi_node (struct GNUNET_FS_Handle *h,
GNUNET_free (filename);
filename = NULL;
}
- GNUNET_free_non_null (ksks);
- GNUNET_free_non_null (skss);
- GNUNET_free_non_null (chks);
+ GNUNET_free (ksks);
+ GNUNET_free (skss);
+ GNUNET_free (chks);
return ret;
cleanup:
- GNUNET_free_non_null (ksks);
- GNUNET_free_non_null (chks);
- GNUNET_free_non_null (skss);
- GNUNET_free_non_null (filename);
+ GNUNET_free (ksks);
+ GNUNET_free (chks);
+ GNUNET_free (skss);
+ GNUNET_free (filename);
GNUNET_FS_file_information_destroy (ret, NULL, NULL);
return NULL;
}
@@ -1417,11 +1417,11 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
GNUNET_break (0);
goto cleanup;
}
- GNUNET_free_non_null (chks);
+ GNUNET_free (chks);
chks = NULL;
- GNUNET_free_non_null (ksks);
+ GNUNET_free (ksks);
ksks = NULL;
- GNUNET_free_non_null (skss);
+ GNUNET_free (skss);
skss = NULL;
switch (b)
@@ -1527,9 +1527,9 @@ GNUNET_FS_file_information_sync_ (struct GNUNET_FS_FileInformation *fi)
cleanup:
if (NULL != wh)
(void) GNUNET_BIO_write_close (wh, NULL);
- GNUNET_free_non_null (chks);
- GNUNET_free_non_null (ksks);
- GNUNET_free_non_null (skss);
+ GNUNET_free (chks);
+ GNUNET_free (ksks);
+ GNUNET_free (skss);
fn = get_serialization_file_name (fi->h,
GNUNET_FS_SYNC_PATH_FILE_INFO,
fi->serialization);
@@ -1729,10 +1729,10 @@ deserialize_publish_file (void *cls, const char *filename)
pc->top = GNUNET_FS_make_top (h, &GNUNET_FS_publish_signal_suspend_, pc);
return GNUNET_OK;
cleanup:
- GNUNET_free_non_null (pc->nid);
- GNUNET_free_non_null (pc->nuid);
- GNUNET_free_non_null (fi_root);
- GNUNET_free_non_null (fi_pos);
+ GNUNET_free (pc->nid);
+ GNUNET_free (pc->nuid);
+ GNUNET_free (fi_root);
+ GNUNET_free (fi_pos);
if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -2131,7 +2131,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc)
goto cleanup;
}
}
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
uris = NULL;
if (GNUNET_OK != GNUNET_BIO_write_close (wh, NULL))
{
@@ -2144,7 +2144,7 @@ GNUNET_FS_download_sync_ (struct GNUNET_FS_DownloadContext *dc)
cleanup:
if (NULL != wh)
(void) GNUNET_BIO_write_close (wh, NULL);
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
if (0 != unlink (fn))
GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_WARNING, "unlink", fn);
GNUNET_free (fn);
@@ -2235,10 +2235,10 @@ GNUNET_FS_search_result_sync_ (struct GNUNET_FS_SearchResult *sr)
GNUNET_break (0);
goto cleanup;
}
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
return;
cleanup:
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
if (NULL != wh)
(void) GNUNET_BIO_write_close (wh, NULL);
remove_sync_file_in_dir (sr->h,
@@ -2309,7 +2309,7 @@ GNUNET_FS_search_sync_ (struct GNUNET_FS_SearchContext *sc)
cleanup:
if (NULL != wh)
(void) GNUNET_BIO_write_close (wh, NULL);
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
GNUNET_FS_remove_sync_file_ (sc->h, category, sc->serialization);
GNUNET_free (sc->serialization);
sc->serialization = NULL;
@@ -2359,7 +2359,7 @@ deserialize_unindex_file (void *cls, const char *filename)
(GNUNET_OK != GNUNET_BIO_read_int32 (rh, "ksk offset",
(int32_t *) &uc->ksk_offset)))
{
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
GNUNET_break (0);
goto cleanup;
}
@@ -2370,7 +2370,7 @@ deserialize_unindex_file (void *cls, const char *filename)
if (NULL == uc->ksk_uri)
{
GNUNET_break (0);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
goto cleanup;
}
}
@@ -2472,7 +2472,7 @@ deserialize_unindex_file (void *cls, const char *filename)
}
return GNUNET_OK;
cleanup:
- GNUNET_free_non_null (uc->filename);
+ GNUNET_free (uc->filename);
if ((NULL != rh) && (GNUNET_OK != GNUNET_BIO_read_close (rh, &emsg)))
{
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
@@ -2485,7 +2485,7 @@ cleanup:
GNUNET_FS_remove_sync_file_ (h,
GNUNET_FS_SYNC_PATH_MASTER_UNINDEX,
uc->serialization);
- GNUNET_free_non_null (uc->serialization);
+ GNUNET_free (uc->serialization);
GNUNET_free (uc);
return GNUNET_OK;
}
@@ -2665,10 +2665,10 @@ deserialize_search_result (void *cls, const char *filename)
}
return GNUNET_OK;
cleanup:
- GNUNET_free_non_null (download);
- GNUNET_free_non_null (emsg);
- GNUNET_free_non_null (uris);
- GNUNET_free_non_null (update_srch);
+ GNUNET_free (download);
+ GNUNET_free (emsg);
+ GNUNET_free (uris);
+ GNUNET_free (update_srch);
if (NULL != sr->uri)
GNUNET_FS_uri_destroy (sr->uri);
if (NULL != sr->meta)
@@ -2823,8 +2823,8 @@ free_search_context (struct GNUNET_FS_SearchContext *sc)
: GNUNET_FS_SYNC_PATH_CHILD_SEARCH,
sc->serialization);
}
- GNUNET_free_non_null (sc->serialization);
- GNUNET_free_non_null (sc->emsg);
+ GNUNET_free (sc->serialization);
+ GNUNET_free (sc->emsg);
if (NULL != sc->uri)
GNUNET_FS_uri_destroy (sc->uri);
if (NULL != sc->master_result_map)
@@ -2896,10 +2896,10 @@ free_download_context (struct GNUNET_FS_DownloadContext *dc)
GNUNET_CONTAINER_meta_data_destroy (dc->meta);
if (NULL != dc->uri)
GNUNET_FS_uri_destroy (dc->uri);
- GNUNET_free_non_null (dc->temp_filename);
- GNUNET_free_non_null (dc->emsg);
- GNUNET_free_non_null (dc->filename);
- GNUNET_free_non_null (dc->serialization);
+ GNUNET_free (dc->temp_filename);
+ GNUNET_free (dc->emsg);
+ GNUNET_free (dc->filename);
+ GNUNET_free (dc->serialization);
while (NULL != (dcc = dc->child_head))
{
GNUNET_CONTAINER_DLL_remove (dc->child_head, dc->child_tail, dcc);
@@ -3020,8 +3020,8 @@ deserialize_download (struct GNUNET_FS_Handle *h,
dc->task = GNUNET_SCHEDULER_add_now (&GNUNET_FS_download_start_task_, dc);
return;
cleanup:
- GNUNET_free_non_null (uris);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (uris);
+ GNUNET_free (emsg);
free_download_context (dc);
}
@@ -3127,9 +3127,9 @@ deserialize_search (struct GNUNET_FS_Handle *h,
GNUNET_free (uris);
return sc;
cleanup:
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
free_search_context (sc);
- GNUNET_free_non_null (uris);
+ GNUNET_free (uris);
return NULL;
}
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,
full_data.size,
full_data.data);
}
- GNUNET_free_non_null (full_data.data);
- GNUNET_free_non_null (filename);
+ GNUNET_free (full_data.data);
+ GNUNET_free (filename);
GNUNET_CONTAINER_meta_data_destroy (md);
GNUNET_FS_uri_destroy (uri);
}
@@ -630,9 +630,9 @@ GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
"malloc");
*rsize = 0;
*rdata = NULL;
- GNUNET_free_non_null (sizes);
- GNUNET_free_non_null (perm);
- GNUNET_free_non_null (bes);
+ GNUNET_free (sizes);
+ GNUNET_free (perm);
+ GNUNET_free (bes);
return GNUNET_SYSERR;
}
*rdata = data;
@@ -662,9 +662,9 @@ GNUNET_FS_directory_builder_finish (struct GNUNET_FS_DirectoryBuilder *bld,
GNUNET_memcpy (&data[off - sizes[i]], &(bes[i])[1], sizes[i]);
GNUNET_free (bes[i]);
}
- GNUNET_free_non_null (sizes);
- GNUNET_free_non_null (perm);
- GNUNET_free_non_null (bes);
+ GNUNET_free (sizes);
+ GNUNET_free (perm);
+ GNUNET_free (bes);
GNUNET_assert (off == size);
GNUNET_CONTAINER_meta_data_destroy (bld->meta);
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)
GNUNET_FS_share_tree_free (ds->toplevel);
if (NULL != ds->stop_task)
GNUNET_SCHEDULER_cancel (ds->stop_task);
- GNUNET_free_non_null (ds->ex_arg);
+ GNUNET_free (ds->ex_arg);
GNUNET_free (ds->filename_expanded);
GNUNET_free (ds);
}
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,
"Failed to create directory for recursive download of `%s'\n"),
full_name);
GNUNET_free (full_name);
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
return;
}
@@ -981,9 +981,9 @@ trigger_recursive_download (void *cls,
dc->options,
NULL,
dc);
- GNUNET_free_non_null (full_name);
- GNUNET_free_non_null (temp_name);
- GNUNET_free_non_null (fn);
+ GNUNET_free (full_name);
+ GNUNET_free (temp_name);
+ GNUNET_free (fn);
}
@@ -999,7 +999,7 @@ GNUNET_FS_free_download_request_ (struct DownloadRequest *dr)
return;
for (unsigned int i = 0; i < dr->num_children; i++)
GNUNET_FS_free_download_request_ (dr->children[i]);
- GNUNET_free_non_null (dr->children);
+ GNUNET_free (dr->children);
GNUNET_free (dr);
}
@@ -2011,11 +2011,11 @@ GNUNET_FS_download_signal_suspend_ (void *cls)
GNUNET_CONTAINER_multihashmap_destroy (dc->active);
dc->active = NULL;
}
- GNUNET_free_non_null (dc->filename);
+ GNUNET_free (dc->filename);
GNUNET_CONTAINER_meta_data_destroy (dc->meta);
GNUNET_FS_uri_destroy (dc->uri);
- GNUNET_free_non_null (dc->temp_filename);
- GNUNET_free_non_null (dc->serialization);
+ GNUNET_free (dc->temp_filename);
+ GNUNET_free (dc->serialization);
GNUNET_assert (NULL == dc->job_queue);
GNUNET_free (dc);
}
@@ -2409,7 +2409,7 @@ GNUNET_FS_download_stop (struct GNUNET_FS_DownloadContext *dc, int do_delete)
dc->temp_filename);
GNUNET_free (dc->temp_filename);
}
- GNUNET_free_non_null (dc->serialization);
+ GNUNET_free (dc->serialization);
GNUNET_assert (NULL == dc->job_queue);
GNUNET_free (dc);
}
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
GNUNET_FS_file_information_set_filename (struct GNUNET_FS_FileInformation *s,
const char *filename)
{
- GNUNET_free_non_null (s->filename);
+ GNUNET_free (s->filename);
if (filename)
s->filename = GNUNET_strdup (filename);
else
@@ -426,7 +426,7 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
&fi->bo,
&no,
&fi->client_info);
- GNUNET_free_non_null (fi->data.dir.dir_data);
+ GNUNET_free (fi->data.dir.dir_data);
}
else
{
@@ -447,8 +447,8 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
&fi->data.file.do_index,
&fi->client_info);
}
- GNUNET_free_non_null (fi->filename);
- GNUNET_free_non_null (fi->emsg);
+ GNUNET_free (fi->filename);
+ GNUNET_free (fi->emsg);
if (NULL != fi->sks_uri)
GNUNET_FS_uri_destroy (fi->sks_uri);
if (NULL != fi->chk_uri)
@@ -462,7 +462,7 @@ GNUNET_FS_file_information_destroy (struct GNUNET_FS_FileInformation *fi,
GNUNET_FS_uri_destroy (fi->keywords);
if (NULL != fi->meta)
GNUNET_CONTAINER_meta_data_destroy (fi->meta);
- GNUNET_free_non_null (fi->serialization);
+ GNUNET_free (fi->serialization);
if (NULL != fi->te)
{
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,
if (GNUNET_OK != GNUNET_BIO_read_spec_commit (rh, rs))
{
GNUNET_break (0);
- GNUNET_free_non_null (n->id);
- GNUNET_free_non_null (n->update);
+ GNUNET_free (n->id);
+ GNUNET_free (n->update);
if (n->md != NULL)
GNUNET_CONTAINER_meta_data_destroy (n->md);
GNUNET_free (n);
@@ -315,7 +315,7 @@ read_update_information_graph (struct GNUNET_FS_Handle *h,
GNUNET_break (0);
GNUNET_free (emsg);
GNUNET_free (n->id);
- GNUNET_free_non_null (n->update);
+ GNUNET_free (n->update);
GNUNET_CONTAINER_meta_data_destroy (n->md);
GNUNET_free (n);
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)
pc->fhc = NULL;
}
GNUNET_FS_file_information_destroy (pc->fi, NULL, NULL);
- GNUNET_free_non_null (pc->nid);
- GNUNET_free_non_null (pc->nuid);
- GNUNET_free_non_null (pc->serialization);
+ GNUNET_free (pc->nid);
+ GNUNET_free (pc->nuid);
+ GNUNET_free (pc->serialization);
if (NULL != pc->dsh)
{
GNUNET_DATASTORE_disconnect (pc->dsh, GNUNET_NO);
@@ -650,7 +650,7 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
dirpos->data.file.file_size, raw_data,
&emsg))
{
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
GNUNET_free (raw_data);
raw_data = NULL;
}
@@ -660,10 +660,10 @@ publish_content (struct GNUNET_FS_PublishContext *pc)
}
GNUNET_FS_directory_builder_add (db, dirpos->chk_uri, dirpos->meta,
raw_data);
- GNUNET_free_non_null (raw_data);
+ GNUNET_free (raw_data);
dirpos = dirpos->next;
}
- GNUNET_free_non_null (p->data.dir.dir_data);
+ GNUNET_free (p->data.dir.dir_data);
p->data.dir.dir_data = NULL;
p->data.dir.dir_size = 0;
GNUNET_FS_directory_builder_finish (db, &p->data.dir.dir_size,
@@ -1281,7 +1281,7 @@ suspend_operation (struct GNUNET_FS_FileInformation *fi,
}
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Suspending publish operation\n");
- GNUNET_free_non_null (fi->serialization);
+ GNUNET_free (fi->serialization);
fi->serialization = NULL;
off = (NULL == fi->chk_uri) ? 0 : (GNUNET_YES == fi->is_directory) ?
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,
&pt[1],
emsg);
}
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
return;
}
j = eos - pt + 1;
@@ -900,7 +900,7 @@ process_sblock (struct GNUNET_FS_SearchContext *sc,
_ ("Failed to parse URI `%s': %s\n"),
uris, emsg);
GNUNET_break_op (0); /* ublock malformed */
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
GNUNET_CONTAINER_meta_data_destroy (meta);
return;
}
@@ -1548,10 +1548,10 @@ search_result_suspend (void *cls,
sr->client_info = GNUNET_FS_search_make_status_ (&pi, sc->h, sc);
}
GNUNET_break (NULL == sr->client_info);
- GNUNET_free_non_null (sr->serialization);
+ GNUNET_free (sr->serialization);
GNUNET_FS_uri_destroy (sr->uri);
GNUNET_CONTAINER_meta_data_destroy (sr->meta);
- GNUNET_free_non_null (sr->keyword_bitmap);
+ GNUNET_free (sr->keyword_bitmap);
GNUNET_free (sr);
return GNUNET_OK;
}
@@ -1596,10 +1596,10 @@ GNUNET_FS_search_signal_suspend_ (void *cls)
GNUNET_free (sc->requests[i].keyword);
}
}
- GNUNET_free_non_null (sc->requests);
- GNUNET_free_non_null (sc->emsg);
+ GNUNET_free (sc->requests);
+ GNUNET_free (sc->emsg);
GNUNET_FS_uri_destroy (sc->uri);
- GNUNET_free_non_null (sc->serialization);
+ GNUNET_free (sc->serialization);
GNUNET_free (sc);
}
@@ -1760,10 +1760,10 @@ search_result_free (void *cls,
GNUNET_break (NULL == sr->probe_ctx);
GNUNET_break (NULL == sr->probe_cancel_task);
GNUNET_break (NULL == sr->client_info);
- GNUNET_free_non_null (sr->serialization);
+ GNUNET_free (sr->serialization);
GNUNET_FS_uri_destroy (sr->uri);
GNUNET_CONTAINER_meta_data_destroy (sr->meta);
- GNUNET_free_non_null (sr->keyword_bitmap);
+ GNUNET_free (sr->keyword_bitmap);
GNUNET_free (sr);
return GNUNET_OK;
}
@@ -1825,8 +1825,8 @@ GNUNET_FS_search_stop (struct GNUNET_FS_SearchContext *sc)
for (i = 0; i < sc->uri->data.ksk.keywordCount; i++)
GNUNET_CONTAINER_multihashmap_destroy (sc->requests[i].results);
}
- GNUNET_free_non_null (sc->requests);
- GNUNET_free_non_null (sc->emsg);
+ GNUNET_free (sc->requests);
+ GNUNET_free (sc->emsg);
GNUNET_FS_uri_destroy (sc->uri);
GNUNET_free (sc);
}
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)
GNUNET_CONTAINER_meta_data_destroy (toplevel->meta);
if (NULL != toplevel->ksk_uri)
GNUNET_FS_uri_destroy (toplevel->ksk_uri);
- GNUNET_free_non_null (toplevel->filename);
- GNUNET_free_non_null (toplevel->short_filename);
+ GNUNET_free (toplevel->filename);
+ GNUNET_free (toplevel->short_filename);
GNUNET_free (toplevel);
}
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)
if ((GNUNET_YES != po->do_index) &&
(NULL != po->publish_tmp_file))
(void) GNUNET_DISK_directory_remove (po->publish_tmp_file);
- GNUNET_free_non_null (po->publish_tmp_file);
+ GNUNET_free (po->publish_tmp_file);
GNUNET_free (po);
}
@@ -217,7 +217,7 @@ publish_timeout (void *cls)
GNUNET_FS_publish_stop (po->publish_context);
po->publish_cont (po->publish_cont_cls, NULL, NULL);
(void) GNUNET_DISK_directory_remove (po->publish_tmp_file);
- GNUNET_free_non_null (po->publish_tmp_file);
+ GNUNET_free (po->publish_tmp_file);
GNUNET_free (po);
}
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,
if (emsg != NULL)
*emsg = te->emsg;
else
- GNUNET_free_non_null (te->emsg);
+ GNUNET_free (te->emsg);
GNUNET_free (te->chk_tree);
GNUNET_free (te);
}
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)
GNUNET_NO, ex,
&unindex_directory_scan_cb,
uc);
- GNUNET_free_non_null (ex);
+ GNUNET_free (ex);
}
@@ -777,8 +777,8 @@ GNUNET_FS_unindex_signal_suspend_ (void *cls)
UNINDEX_STATE_COMPLETE) ? uc->file_size : 0);
GNUNET_break (NULL == uc->client_info);
GNUNET_free (uc->filename);
- GNUNET_free_non_null (uc->serialization);
- GNUNET_free_non_null (uc->emsg);
+ GNUNET_free (uc->serialization);
+ GNUNET_free (uc->emsg);
GNUNET_free (uc);
}
@@ -892,7 +892,7 @@ GNUNET_FS_unindex_stop (struct GNUNET_FS_UnindexContext *uc)
(uc->state ==
UNINDEX_STATE_COMPLETE) ? uc->file_size : 0);
GNUNET_break (NULL == uc->client_info);
- GNUNET_free_non_null (uc->emsg);
+ GNUNET_free (uc->emsg);
GNUNET_free (uc->filename);
GNUNET_free (uc);
}
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)
return ret;
CLEANUP:
for (i = 0; i < max; i++)
- GNUNET_free_non_null (keywords[i]);
+ GNUNET_free (keywords[i]);
GNUNET_free (keywords);
GNUNET_free (dup);
return NULL;
@@ -1172,7 +1172,7 @@ GNUNET_FS_uri_ksk_create_from_args (unsigned int argc, const char **argv)
strlen (GNUNET_FS_URI_PREFIX))) &&
(NULL != (uri = GNUNET_FS_uri_parse (argv[0], &emsg))))
return uri;
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
uri = GNUNET_new (struct GNUNET_FS_Uri);
uri->type = GNUNET_FS_URI_KSK;
uri->data.ksk.keywordCount = argc;
@@ -1825,7 +1825,7 @@ GNUNET_FS_uri_ksk_create_from_meta_data (
ret->data.ksk.keywords,
ret->data.ksk.keywordCount);
if (ent > 0)
- GNUNET_free_non_null (full_name);
+ GNUNET_free (full_name);
return ret;
}
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 ()
return;
rh = NULL;
error:
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
if (NULL != rh)
(void) GNUNET_BIO_read_close (rh, &emsg);
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_ ("Failed to load state: %s\n"),
emsg);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
}
@@ -781,7 +781,7 @@ main (int argc, char *const *argv)
shc_chld = NULL;
GNUNET_DISK_pipe_close (sigpipe);
sigpipe = NULL;
- GNUNET_free_non_null (cfg_filename);
+ GNUNET_free (cfg_filename);
cfg_filename = NULL;
GNUNET_free_nz ((void *) argv);
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,
GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL);
printf ("\n");
printf (_ ("Directory `%s' contents:\n"), name ? name : "");
- GNUNET_free_non_null (name);
+ GNUNET_free (name);
return;
}
string = GNUNET_FS_uri_to_string (uri);
@@ -114,7 +114,7 @@ print_entry (void *cls,
GNUNET_free (string);
GNUNET_CONTAINER_meta_data_iterate (meta, &item_printer, NULL);
printf ("\n");
- GNUNET_free_non_null (name);
+ GNUNET_free (name);
}
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)
_ ("Failed to access `%s': %s\n"),
args0,
strerror (errno));
- GNUNET_free_non_null (ex);
+ GNUNET_free (ex);
return;
}
ds = GNUNET_FS_directory_scan_start (args0,
@@ -744,10 +744,10 @@ identity_continuation (const char *args0)
"%s",
_ (
"Failed to start meta directory scanner. Is gnunet-helper-publish-fs installed?\n"));
- GNUNET_free_non_null (ex);
+ GNUNET_free (ex);
return;
}
- GNUNET_free_non_null (ex);
+ GNUNET_free (ex);
}
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)
_ ("Failed to write directory with search results to `%s'\n"),
output_filename);
}
- GNUNET_free_non_null (ddata);
+ GNUNET_free (ddata);
GNUNET_free (output_filename);
}
@@ -197,7 +197,7 @@ progress_cb (void *cls, const struct GNUNET_FS_ProgressInfo *info)
NULL);
printf ("\n");
fflush (stdout);
- GNUNET_free_non_null (filename);
+ GNUNET_free (filename);
GNUNET_free (uri);
results++;
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)
if (NULL != pr->public_data.target)
ext[k++] = *pr->public_data.target;
GNUNET_memcpy (&ext[k], bf_data, bf_size);
- GNUNET_free_non_null (bf_data);
+ GNUNET_free (bf_data);
return env;
}
@@ -622,7 +622,7 @@ clean_request (void *cls, const struct GNUNET_HashCode *key, void *value)
cont (pr->llc_cont_cls, pr, pr->local_result);
}
GSF_plan_notify_request_done_ (pr);
- GNUNET_free_non_null (pr->replies_seen);
+ GNUNET_free (pr->replies_seen);
GNUNET_BLOCK_group_destroy (pr->bg);
pr->bg = NULL;
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,
GNUNET_FS_file_information_destroy (fidir, &mycleaner, NULL);
GNUNET_DISK_directory_remove (fn1);
GNUNET_DISK_directory_remove (fn2);
- GNUNET_free_non_null (fn1);
- GNUNET_free_non_null (fn2);
+ GNUNET_free (fn1);
+ GNUNET_free (fn2);
GNUNET_FS_stop (fs);
}
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)
fprintf (stderr, "failed to parse URI `%s': %s\n", sbuf, msg);
err = 1;
GNUNET_FS_stop (fs);
- GNUNET_free_non_null (msg);
+ GNUNET_free (msg);
return;
}
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)
GNUNET_GNS_lookup_cancel (ltr->lr);
ltr->lr = NULL;
}
- GNUNET_free_non_null (ltr->longest_match);
+ GNUNET_free (ltr->longest_match);
GNUNET_free (ltr->name);
GNUNET_free (ltr);
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,
static void
shutdown_task (void *cls)
{
- GNUNET_free_non_null (master_zone_pkey);
+ GNUNET_free (master_zone_pkey);
master_zone_pkey = NULL;
- GNUNET_free_non_null (private_zone_pkey);
+ GNUNET_free (private_zone_pkey);
private_zone_pkey = NULL;
if (NULL != list_it)
{
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)
GNUNET_CONTAINER_DLL_remove (s5r_head,
s5r_tail,
s5r);
- GNUNET_free_non_null (s5r->domain);
- GNUNET_free_non_null (s5r->leho);
- GNUNET_free_non_null (s5r->url);
+ GNUNET_free (s5r->domain);
+ GNUNET_free (s5r->leho);
+ GNUNET_free (s5r->url);
for (unsigned int i = 0; i < s5r->num_danes; i++)
GNUNET_free (s5r->dane_data[i]);
GNUNET_free (s5r);
@@ -1311,8 +1311,8 @@ curl_check_hdr (void *buffer,
}
cleanup:
GNUNET_free (ndup);
- GNUNET_free_non_null (new_cookie_hdr);
- GNUNET_free_non_null (new_location);
+ GNUNET_free (new_cookie_hdr);
+ GNUNET_free (new_location);
return bytes;
}
@@ -2446,14 +2446,14 @@ kill_httpd (struct MhdHttpList *hd)
GNUNET_CONTAINER_DLL_remove (mhd_httpd_head,
mhd_httpd_tail,
hd);
- GNUNET_free_non_null (hd->domain);
+ GNUNET_free (hd->domain);
MHD_stop_daemon (hd->daemon);
if (NULL != hd->httpd_task)
{
GNUNET_SCHEDULER_cancel (hd->httpd_task);
hd->httpd_task = NULL;
}
- GNUNET_free_non_null (hd->proxy_cert);
+ GNUNET_free (hd->proxy_cert);
if (hd == httpd)
httpd = NULL;
GNUNET_free (hd);
@@ -2657,7 +2657,7 @@ load_key_from_file (gnutls_x509_privkey_t key,
_ ("Unable to import private key from file `%s'\n"),
keyfile);
}
- GNUNET_free_non_null (key_data.data);
+ GNUNET_free (key_data.data);
return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
}
@@ -2689,7 +2689,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
_ ("Unable to import certificate from `%s'\n"),
certfile);
}
- GNUNET_free_non_null (cert_data.data);
+ GNUNET_free (cert_data.data);
return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
}
@@ -2921,7 +2921,7 @@ setup_data_transfer (struct Socks5Request *s5r)
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
_ ("Failed to pass client to MHD\n"));
cleanup_s5r (s5r);
- GNUNET_free_non_null (domain);
+ GNUNET_free (domain);
return;
}
s5r->hd = hd;
@@ -2929,7 +2929,7 @@ setup_data_transfer (struct Socks5Request *s5r)
s5r->timeout_task = GNUNET_SCHEDULER_add_delayed (HTTP_HANDSHAKE_TIMEOUT,
&timeout_s5r_handshake,
s5r);
- GNUNET_free_non_null (domain);
+ GNUNET_free (domain);
}
@@ -3145,7 +3145,7 @@ handle_gns_result (void *cls,
break;
case GNUNET_GNSRECORD_TYPE_LEHO:
- GNUNET_free_non_null (s5r->leho);
+ GNUNET_free (s5r->leho);
s5r->leho = GNUNET_strndup (r->data,
r->data_size);
break;
@@ -3732,10 +3732,10 @@ run (void *cls,
gnutls_x509_crt_deinit (proxy_ca.cert);
gnutls_x509_privkey_deinit (proxy_ca.key);
gnutls_global_deinit ();
- GNUNET_free_non_null (cafile_cfg);
+ GNUNET_free (cafile_cfg);
return;
}
- GNUNET_free_non_null (cafile_cfg);
+ GNUNET_free (cafile_cfg);
if (NULL == (gns_handle = GNUNET_GNS_connect (cfg)))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -3900,7 +3900,7 @@ main (int argc,
options,
&run, NULL)) ? 0 : 1;
MHD_destroy_response (curl_failure_response);
- GNUNET_free_non_null ((char *) argv);
+ GNUNET_free_nz ((char *) argv);
return ret;
}
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,
(off != rd->data_size))
{
GNUNET_break_op (0); /* record not well-formed */
- GNUNET_free_non_null (cname);
+ GNUNET_free (cname);
fail_resolution (rh);
return;
}
@@ -1777,8 +1777,8 @@ recursive_gns2dns_resolution (struct GNS_ResolverHandle *rh,
(off != rd[i].data_size))
{
GNUNET_break_op (0);
- GNUNET_free_non_null (n);
- GNUNET_free_non_null (ip);
+ GNUNET_free (n);
+ GNUNET_free (ip);
continue;
}
/* resolve 'ip' to determine the IP(s) of the DNS
@@ -1983,7 +1983,7 @@ handle_gns_resolution_result (void *cls,
(off != rd[0].data_size))
{
GNUNET_break_op (0);
- GNUNET_free_non_null (cname);
+ GNUNET_free (cname);
fail_resolution (rh);
return;
}
@@ -2137,7 +2137,7 @@ handle_gns_resolution_result (void *cls,
rd_off++;
}
}
- GNUNET_free_non_null (cname);
+ GNUNET_free (cname);
}
break;
@@ -2993,7 +2993,7 @@ GNS_resolver_lookup_cancel (struct GNS_ResolverHandle *rh)
dr);
GNUNET_free (dr);
}
- GNUNET_free_non_null (rh->leho);
+ GNUNET_free (rh->leho);
GNUNET_free (rh->name);
GNUNET_free (rh);
}
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,
if (NULL == ns)
{
GNUNET_break_op (0);
- GNUNET_free_non_null (ns);
+ GNUNET_free (ns);
return NULL;
}
/* DNS server IP/name must be UTF-8 */
ip = GNUNET_strdup (&((const char*) data)[off]);
GNUNET_asprintf (&nstr, "%s@%s", ns, ip);
- GNUNET_free_non_null (ns);
- GNUNET_free_non_null (ip);
+ GNUNET_free (ns);
+ GNUNET_free (ip);
return nstr;
}
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)
plugin->cfg = NULL;
- GNUNET_free_non_null (allow_methods);
+ GNUNET_free (allow_methods);
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Gns REST plugin is finished\n");
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,
_ ("Unable to import private key from file `%s'\n"),
keyfile);
}
- GNUNET_free_non_null (key_data.data);
+ GNUNET_free (key_data.data);
return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
}
@@ -171,7 +171,7 @@ load_cert_from_file (gnutls_x509_crt_t crt,
_ ("Unable to import certificate from `%s'\n"),
certfile);
}
- GNUNET_free_non_null (cert_data.data);
+ GNUNET_free (cert_data.data);
return (GNUTLS_E_SUCCESS != ret) ? GNUNET_SYSERR : GNUNET_OK;
}
@@ -245,7 +245,7 @@ do_shutdown ()
MHD_stop_daemon (mhd);
mhd = NULL;
}
- GNUNET_free_non_null (url);
+ GNUNET_free (url);
if (NULL != proxy_proc)
{
@@ -568,7 +568,7 @@ main (int argc, char *const *argv)
options,
&run, NULL))
return 1;
- GNUNET_free_non_null ((char *) argv);
+ GNUNET_free ((char *) argv);
return global_ret;
}
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 ()
GNUNET_free (plugin->library_name);
GNUNET_free (plugin);
}
- GNUNET_free_non_null (gns_plugins);
+ GNUNET_free (gns_plugins);
gns_plugins = NULL;
once = 0;
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,
if ((NULL == ns) || (off != data_size))
{
GNUNET_break_op (0);
- GNUNET_free_non_null (ns);
+ GNUNET_free (ns);
return NULL;
}
return ns;
@@ -80,7 +80,7 @@ dns_value_to_string (void *cls,
if ((NULL == cname) || (off != data_size))
{
GNUNET_break_op (0);
- GNUNET_free_non_null (cname);
+ GNUNET_free (cname);
return NULL;
}
return cname;
@@ -121,7 +121,7 @@ dns_value_to_string (void *cls,
if ((NULL == ptr) || (off != data_size))
{
GNUNET_break_op (0);
- GNUNET_free_non_null (ptr);
+ GNUNET_free (ptr);
return NULL;
}
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,
GNUNET_STRINGS_base64_decode (raws, sc - raws, (void **) &sig))
{
GNUNET_break_op (0);
- GNUNET_free_non_null (sig);
+ GNUNET_free (sig);
return NULL;
}
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,
if (0 == esize)
{
GNUNET_break (0);
- GNUNET_free_non_null (ret);
+ GNUNET_free (ret);
return NULL;
}
/* 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 ()
curl_easy_cleanup (curl);
curl = NULL;
}
- GNUNET_free_non_null (current_url);
+ GNUNET_free (current_url);
current_url = NULL;
stat_bytes_downloaded = 0;
stat_download_in_progress = GNUNET_NO;
@@ -1460,7 +1460,7 @@ load_hostlist_file ()
linked_list_size,
GNUNET_NO);
- GNUNET_free_non_null (uri);
+ GNUNET_free (uri);
emsg = NULL;
(void) GNUNET_BIO_read_close (rh, &emsg);
if (emsg != NULL)
@@ -1657,15 +1657,15 @@ GNUNET_HOSTLIST_client_start (const struct GNUNET_CONFIGURATION_Handle *c,
GNUNET_free (proxytype_str);
GNUNET_free (proxy);
proxy = NULL;
- GNUNET_free_non_null (proxy_username);
+ GNUNET_free (proxy_username);
proxy_username = NULL;
- GNUNET_free_non_null (proxy_password);
+ GNUNET_free (proxy_password);
proxy_password = NULL;
return GNUNET_SYSERR;
}
}
- GNUNET_free_non_null (proxytype_str);
+ GNUNET_free (proxytype_str);
}
stat_learning = learn;
@@ -1786,11 +1786,11 @@ GNUNET_HOSTLIST_client_stop ()
ti_check_download = NULL;
curl_global_cleanup ();
}
- GNUNET_free_non_null (proxy);
+ GNUNET_free (proxy);
proxy = NULL;
- GNUNET_free_non_null (proxy_username);
+ GNUNET_free (proxy_username);
proxy_username = NULL;
- GNUNET_free_non_null (proxy_password);
+ GNUNET_free (proxy_password);
proxy_password = NULL;
if (NULL != pi)
{
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,
{
GNUNET_assert (NULL == peer);
builder->pitr = NULL;
- GNUNET_free_non_null (builder->data);
+ GNUNET_free (builder->data);
GNUNET_free (builder);
builder = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -534,7 +534,7 @@ process_notify (void *cls,
GNUNET_PEERINFO_iterate_cancel (builder->pitr);
builder->pitr = NULL;
}
- GNUNET_free_non_null (builder->data);
+ GNUNET_free (builder->data);
builder->size = 0;
builder->data = NULL;
}
@@ -886,7 +886,7 @@ GNUNET_HOSTLIST_server_stop ()
GNUNET_PEERINFO_iterate_cancel (builder->pitr);
builder->pitr = NULL;
}
- GNUNET_free_non_null (builder->data);
+ GNUNET_free (builder->data);
GNUNET_free (builder);
builder = NULL;
}
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,
expected_uri,
current_adv_uri);
GNUNET_free (expected_uri);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
}
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)
plugin->cfg = NULL;
- GNUNET_free_non_null (allow_methods);
+ GNUNET_free (allow_methods);
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Identity REST plugin is finished\n");
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);
/**
+ * Forward declaration to make compiler happy depending on include order.
+ */
+struct GNUNET_PeerIdentity;
+
+
+/**
* @ingroup logging
* Convert a peer identity to a string (for printing debug messages).
* This is one of the very few calls in the entire API that is
@@ -1275,6 +1281,7 @@ GNUNET_is_zero_ (const void *a,
#define GNUNET_malloc_large(size) \
GNUNET_xmalloc_unchecked_ (size, __FILE__, __LINE__)
+
/**
* @ingroup memory
* Wrapper around realloc. Reallocates size bytes of memory.
@@ -1287,6 +1294,7 @@ GNUNET_is_zero_ (const void *a,
#define GNUNET_realloc(ptr, size) \
GNUNET_xrealloc_ (ptr, size, __FILE__, __LINE__)
+
/**
* @ingroup memory
* Wrapper around free. Frees the memory referred to by ptr.
@@ -1294,40 +1302,27 @@ GNUNET_is_zero_ (const void *a,
* allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free_nz.
*
* @param ptr location where to free the memory. ptr must have
- * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier.
+ * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed.
*/
#define GNUNET_free_nz(ptr) GNUNET_xfree_ (ptr, __FILE__, __LINE__)
+
/**
* @ingroup memory
* Wrapper around free. Frees the memory referred to by ptr and sets ptr to NULL.
* Note that it is generally better to free memory that was
* allocated with #GNUNET_array_grow using #GNUNET_array_grow(mem, size, 0) instead of #GNUNET_free.
*
+ * @a ptr will be set to NULL. Use #GNUNET_free_nz() if @a ptr is not an L-value.
+ *
* @param ptr location where to free the memory. ptr must have
- * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier.
+ * been returned by #GNUNET_strdup, #GNUNET_strndup, #GNUNET_malloc or #GNUNET_array_grow earlier. NULL is allowed.
*/
#define GNUNET_free(ptr) do { \
GNUNET_xfree_ (ptr, __FILE__, __LINE__); \
ptr = NULL; \
} while (0)
-/**
- * @ingroup memory
- * Free the memory pointed to by ptr if ptr is not NULL.
- * Equivalent to `if (NULL != ptr) GNUNET_free(ptr)`.
- *
- * @param ptr the location in memory to free
- */
-#define GNUNET_free_non_null(ptr) \
- do \
- { \
- void *__x__ = ptr; \
- if (NULL != __x__) \
- { \
- GNUNET_free (__x__); \
- } \
- } while (0)
/**
* @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)
(unsigned int) mysql_port,
NULL,
CLIENT_IGNORE_SIGPIPE);
- GNUNET_free_non_null (mysql_server);
- GNUNET_free_non_null (mysql_user);
- GNUNET_free_non_null (mysql_password);
+ GNUNET_free (mysql_server);
+ GNUNET_free (mysql_user);
+ GNUNET_free (mysql_password);
GNUNET_free (mysql_dbname);
if (mysql_error (mc->dbf)[0])
{
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)
GNUNET_ERROR_TYPE_ERROR,
"sqlite3_close");
- GNUNET_free_non_null (plugin->fn);
+ GNUNET_free (plugin->fn);
}
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,
rd[i].data_size)))) ||
(0 == strcmp (vs, value)))))
rdx[rd_left++] = rd[i];
- GNUNET_free_non_null (vs);
+ GNUNET_free (vs);
}
if (rd_count == rd_left)
{
@@ -1307,7 +1307,7 @@ identity_cb (void *cls, struct GNUNET_IDENTITY_Ego *ego)
return;
}
zone_pkey = *GNUNET_IDENTITY_ego_get_private_key (ego);
- GNUNET_free_non_null (ego_name);
+ GNUNET_free (ego_name);
ego_name = NULL;
run_with_zone_pkey (cfg);
}
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,
break;
}
}
- GNUNET_free_non_null (oldest->rd);
+ GNUNET_free (oldest->rd);
oldest->zone = *zone;
if (NULL != nick)
{
@@ -1392,7 +1392,7 @@ handle_record_lookup (void *cls, const struct LabelLookupMessage *ll_msg)
GNUNET_memcpy (&llr_msg[1], name_tmp, name_len);
GNUNET_memcpy (&res_name[name_len], rlc.res_rd, rlc.rd_ser_len);
GNUNET_MQ_send (nc->mq, env);
- GNUNET_free_non_null (rlc.res_rd);
+ GNUNET_free (rlc.res_rd);
}
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)
GNUNET_ERROR_TYPE_ERROR,
"sqlite3_close");
- GNUNET_free_non_null (plugin->fn);
+ GNUNET_free (plugin->fn);
}
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)
resp = GNUNET_REST_create_response (result_str);
MHD_add_response_header (resp, "Content-Type", "application/json");
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
- GNUNET_free_non_null (result_str);
+ GNUNET_free (result_str);
GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
}
@@ -1109,7 +1109,7 @@ libgnunet_plugin_rest_namestore_done (void *cls)
plugin->cfg = NULL;
- GNUNET_free_non_null (allow_methods);
+ GNUNET_free (allow_methods);
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Namestore REST plugin is finished\n");
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";
static void
cleanup ()
{
- GNUNET_free_non_null ((void *) rd_orig.data);
+ GNUNET_free ((void *) rd_orig.data);
if (NULL != nsh)
{
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 ()
GNUNET_NAMESTORE_disconnect (nsh);
nsh = NULL;
}
- GNUNET_free_non_null (s_name_1);
- GNUNET_free_non_null (s_name_2);
- GNUNET_free_non_null (s_name_3);
+ GNUNET_free (s_name_1);
+ GNUNET_free (s_name_2);
+ GNUNET_free (s_name_3);
if (s_rd_1 != NULL)
{
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)
GNUNET_SCHEDULER_cancel (endbadly_task);
endbadly_task = NULL;
}
- GNUNET_free_non_null (s_name_1);
- GNUNET_free_non_null (s_name_2);
- GNUNET_free_non_null (s_name_3);
+ GNUNET_free (s_name_1);
+ GNUNET_free (s_name_2);
+ GNUNET_free (s_name_3);
if (NULL != s_rd_1)
{
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)
GNUNET_NAMESTORE_disconnect (nsh);
nsh = NULL;
}
- GNUNET_free_non_null (s_name_1);
- GNUNET_free_non_null (s_name_2);
- GNUNET_free_non_null (s_name_3);
+ GNUNET_free (s_name_1);
+ GNUNET_free (s_name_2);
+ GNUNET_free (s_name_3);
if (s_rd_1 != NULL)
{
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)
GNUNET_SCHEDULER_cancel (endbadly_task);
endbadly_task = NULL;
}
- GNUNET_free_non_null (s_name_1);
- GNUNET_free_non_null (s_name_2);
- GNUNET_free_non_null (s_name_3);
+ GNUNET_free (s_name_1);
+ GNUNET_free (s_name_2);
+ GNUNET_free (s_name_3);
if (s_rd_1 != NULL)
{
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)
GNUNET_NAMESTORE_disconnect (nsh);
nsh = NULL;
}
- GNUNET_free_non_null (s_name_1);
- GNUNET_free_non_null (s_name_2);
- GNUNET_free_non_null (s_name_3);
+ GNUNET_free (s_name_1);
+ GNUNET_free (s_name_2);
+ GNUNET_free (s_name_3);
if (s_rd_1 != NULL)
{
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)
_ ("No working gnunet-helper-nat-server found\n"));
}
err:
- GNUNET_free_non_null (tmp);
+ GNUNET_free (tmp);
GNUNET_free (helper);
if ((GNUNET_OK == ext_ip) &&
@@ -853,7 +853,7 @@ test_icmp_client (struct GNUNET_NAT_AutoHandle *ah)
_ ("No working gnunet-helper-nat-server found\n"));
}
err:
- GNUNET_free_non_null (tmp);
+ GNUNET_free (tmp);
GNUNET_free (helper);
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,
&stun_read_task,
NULL);
}
- GNUNET_free_non_null (remote_sa);
- GNUNET_free_non_null (local_sa);
+ GNUNET_free (remote_sa);
+ GNUNET_free (local_sa);
test_finished ();
return;
fail_and_shutdown:
global_ret = 1;
GNUNET_SCHEDULER_shutdown ();
- GNUNET_free_non_null (remote_sa);
- GNUNET_free_non_null (local_sa);
+ GNUNET_free (remote_sa);
+ GNUNET_free (local_sa);
}
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,
ch->caddrs[i].mh = NULL;
}
}
- GNUNET_free_non_null (ch->caddrs);
+ GNUNET_free (ch->caddrs);
while (NULL != (lal = ch->ext_addr_head))
{
GNUNET_CONTAINER_DLL_remove (ch->ext_addr_head,
@@ -2032,8 +2032,8 @@ client_disconnect_cb (void *cls,
GNUNET_RESOLVER_request_cancel (ch->ext_dns);
ch->ext_dns = NULL;
}
- GNUNET_free_non_null (ch->hole_external);
- GNUNET_free_non_null (ch->section_name);
+ GNUNET_free (ch->hole_external);
+ GNUNET_free (ch->section_name);
GNUNET_free (ch);
}
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,
if (addr == NULL)
return GNUNET_OK;
- GNUNET_free_non_null (data->addr);
+ GNUNET_free (data->addr);
data->addr = GNUNET_malloc (addrlen);
GNUNET_memcpy (data->addr, addr, addrlen);
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)
}
}
printf ("\n");
- GNUNET_free_non_null (pc->address_list);
+ GNUNET_free (pc->address_list);
GNUNET_CONTAINER_DLL_remove (pc_head, pc_tail, pc);
GNUNET_free (pc);
if ((NULL == pc_head) && (NULL == pic))
@@ -619,14 +619,14 @@ shutdown_task (void *cls)
for (i = 0; i < pc->address_list_size; i++)
{
ar = &pc->address_list[i];
- GNUNET_free_non_null (ar->result);
+ GNUNET_free (ar->result);
if (NULL != ar->atsc)
{
GNUNET_TRANSPORT_address_to_string_cancel (ar->atsc);
ar->atsc = NULL;
}
}
- GNUNET_free_non_null (pc->address_list);
+ GNUNET_free (pc->address_list);
GNUNET_free (pc);
}
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)
resp = GNUNET_REST_create_response (result_str);
MHD_add_response_header (resp, "Content-Type", "application/json");
handle->proc (handle->proc_cls, resp, MHD_HTTP_OK);
- GNUNET_free_non_null (result_str);
+ GNUNET_free (result_str);
GNUNET_SCHEDULER_add_now (&cleanup_handle, handle);
}
@@ -452,7 +452,7 @@ dump_pc (struct PrintContext *pc)
json_decref (temp_array);
json_decref (response_entry);
- GNUNET_free_non_null (pc->address_list);
+ GNUNET_free (pc->address_list);
GNUNET_CONTAINER_DLL_remove (pc_head,
pc_tail,
pc);
@@ -813,7 +813,7 @@ libgnunet_plugin_rest_peerinfo_done (void *cls)
plugin->cfg = NULL;
- GNUNET_free_non_null (allow_methods);
+ GNUNET_free (allow_methods);
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"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)
update_hello (identity, r.hello);
if (NULL != r.friend_only_hello)
update_hello (identity, r.friend_only_hello);
- GNUNET_free_non_null (r.hello);
- GNUNET_free_non_null (r.friend_only_hello);
+ GNUNET_free (r.hello);
+ GNUNET_free (r.friend_only_hello);
GNUNET_free (fn);
}
}
@@ -825,7 +825,7 @@ update_hello (const struct GNUNET_PeerIdentity *peer,
GNUNET_free (buffer);
}
}
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
notify_all (host);
}
@@ -982,7 +982,7 @@ discard_hosts_helper (void *cls, const char *fn)
write_pos += new_hello_size;
}
read_pos += cur_hello_size;
- GNUNET_free_non_null (new_hello);
+ GNUNET_free (new_hello);
}
if (0 < write_pos)
@@ -1209,8 +1209,8 @@ free_host_entry (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
(void) cls;
(void) key;
- GNUNET_free_non_null (he->hello);
- GNUNET_free_non_null (he->friend_only_hello);
+ GNUNET_free (he->hello);
+ GNUNET_free (he->friend_only_hello);
GNUNET_free (he);
return GNUNET_YES;
}
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)
{
GNUNET_CONTAINER_DLL_remove (ic->h->iterate_head, ic->h->iterate_tail, ic);
GNUNET_free (ic->sub_system);
- GNUNET_free_non_null (ic->key);
+ GNUNET_free (ic->key);
GNUNET_free (ic);
}
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)
s);
else
GNUNET_break (0);
- GNUNET_free_non_null (o);
+ GNUNET_free (o);
}
entry->value_size = GNUNET_STRINGS_base64_decode (value,
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)
LOG_SQLITE (plugin,
GNUNET_ERROR_TYPE_ERROR,
"sqlite3_close");
- GNUNET_free_non_null (plugin->fn);
+ GNUNET_free (plugin->fn);
}
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,
GNUNET_PQ_reconnect (db);
if (NULL == db->conn)
{
- GNUNET_free_non_null (db->load_path);
+ GNUNET_free (db->load_path);
GNUNET_free (db->config_str);
GNUNET_free (db);
return NULL;
@@ -495,9 +495,9 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
load_path,
es,
ps);
- GNUNET_free_non_null (load_path);
- GNUNET_free_non_null (sp);
- GNUNET_free_non_null (conninfo);
+ GNUNET_free (load_path);
+ GNUNET_free (sp);
+ GNUNET_free (conninfo);
return db;
}
@@ -511,10 +511,10 @@ GNUNET_PQ_connect_with_cfg (const struct GNUNET_CONFIGURATION_Handle *cfg,
void
GNUNET_PQ_disconnect (struct GNUNET_PQ_Context *db)
{
- GNUNET_free_non_null (db->es);
- GNUNET_free_non_null (db->ps);
- GNUNET_free_non_null (db->load_path);
- GNUNET_free_non_null (db->config_str);
+ GNUNET_free (db->es);
+ GNUNET_free (db->ps);
+ GNUNET_free (db->load_path);
+ GNUNET_free (db->config_str);
PQfinish (db->conn);
GNUNET_free (db);
}
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,
memcpy (&rps[olen],
ps,
nlen * sizeof (struct GNUNET_PQ_PreparedStatement));
- GNUNET_free_non_null (db->ps);
+ GNUNET_free (db->ps);
db->ps = rps;
}
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)
GNUNET_NAMESTORE_disconnect (namestore);
namestore = NULL;
}
- GNUNET_free_non_null (url);
+ GNUNET_free (url);
url = NULL;
}
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)
GNUNET_VPN_disconnect (vpn);
vpn = NULL;
}
- GNUNET_free_non_null (url);
+ GNUNET_free (url);
url = NULL;
}
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,
attr->flag,
id,
(NULL == attest) ? "" : "(ATTESTED)");
- GNUNET_free_non_null (value_str);
+ GNUNET_free (value_str);
GNUNET_free (id);
}
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)
{
if (NULL != lu->lookup_request)
GNUNET_GNS_lookup_cancel (lu->lookup_request);
- GNUNET_free_non_null (lu->label);
+ GNUNET_free (lu->label);
GNUNET_CONTAINER_DLL_remove (cth->parallel_lookups_head,
cth->parallel_lookups_tail,
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,
+ sizeof(struct GNUNET_CRYPTO_EcdsaSignature))
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Authorization code malformed\n");
- GNUNET_free_non_null (code_payload);
+ GNUNET_free (code_payload);
return GNUNET_SYSERR;
}
@@ -646,7 +646,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Expected code verifier!\n");
- GNUNET_free_non_null (code_payload);
+ GNUNET_free (code_payload);
return GNUNET_SYSERR;
}
code_verifier_hash = GNUNET_malloc (256 / 8);
@@ -669,7 +669,7 @@ OIDC_parse_authz_code (const struct GNUNET_CRYPTO_EcdsaPrivateKey *ecdsa_priv,
expected_code_challenge,
code_challenge_len,
code_challenge);
- GNUNET_free_non_null (code_payload);
+ GNUNET_free (code_payload);
GNUNET_free (expected_code_challenge);
return GNUNET_SYSERR;
}
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)
GNUNET_RECLAIM_cancel (handle->idp_op);
if (NULL != handle->idp)
GNUNET_RECLAIM_disconnect (handle->idp);
- GNUNET_free_non_null (handle->url);
- GNUNET_free_non_null (handle->tld);
- GNUNET_free_non_null (handle->redirect_prefix);
- GNUNET_free_non_null (handle->redirect_suffix);
- GNUNET_free_non_null (handle->emsg);
- GNUNET_free_non_null (handle->edesc);
+ GNUNET_free (handle->url);
+ GNUNET_free (handle->tld);
+ GNUNET_free (handle->redirect_prefix);
+ GNUNET_free (handle->redirect_suffix);
+ GNUNET_free (handle->emsg);
+ GNUNET_free (handle->edesc);
if (NULL != handle->gns_op)
GNUNET_GNS_lookup_cancel (handle->gns_op);
if (NULL != handle->gns_handle)
@@ -572,13 +572,13 @@ cleanup_handle (struct RequestHandle *handle)
GNUNET_NAMESTORE_disconnect (handle->namestore_handle);
if (NULL != handle->oidc)
{
- GNUNET_free_non_null (handle->oidc->client_id);
- GNUNET_free_non_null (handle->oidc->login_identity);
- GNUNET_free_non_null (handle->oidc->nonce);
- GNUNET_free_non_null (handle->oidc->redirect_uri);
- GNUNET_free_non_null (handle->oidc->response_type);
- GNUNET_free_non_null (handle->oidc->scope);
- GNUNET_free_non_null (handle->oidc->state);
+ GNUNET_free (handle->oidc->client_id);
+ GNUNET_free (handle->oidc->login_identity);
+ GNUNET_free (handle->oidc->nonce);
+ GNUNET_free (handle->oidc->redirect_uri);
+ GNUNET_free (handle->oidc->response_type);
+ GNUNET_free (handle->oidc->scope);
+ GNUNET_free (handle->oidc->state);
json_decref (handle->oidc->response);
GNUNET_free (handle->oidc);
}
@@ -594,8 +594,8 @@ cleanup_handle (struct RequestHandle *handle)
GNUNET_CONTAINER_DLL_remove (handle->ego_head,
handle->ego_tail,
ego_entry);
- GNUNET_free_non_null (ego_entry->identifier);
- GNUNET_free_non_null (ego_entry->keystring);
+ GNUNET_free (ego_entry->identifier);
+ GNUNET_free (ego_entry->keystring);
GNUNET_free (ego_entry);
}
GNUNET_free (handle);
@@ -1734,7 +1734,7 @@ login_cont (struct GNUNET_REST_RequestHandle *con_handle,
OIDC_COOKIE_EXPIRATION));
last_time =
GNUNET_CONTAINER_multihashmap_get (OIDC_cookie_jar_map, &cache_key);
- GNUNET_free_non_null (last_time);
+ GNUNET_free (last_time);
GNUNET_CONTAINER_multihashmap_put (OIDC_cookie_jar_map,
&cache_key,
current_time,
@@ -1804,7 +1804,7 @@ check_authorization (struct RequestHandle *handle,
client_id = strtok (basic_authorization, ":");
if (NULL == client_id)
{
- GNUNET_free_non_null (basic_authorization);
+ GNUNET_free (basic_authorization);
handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
handle->response_code = MHD_HTTP_UNAUTHORIZED;
return GNUNET_SYSERR;
@@ -1812,7 +1812,7 @@ check_authorization (struct RequestHandle *handle,
pass = strtok (NULL, ":");
if (NULL == pass)
{
- GNUNET_free_non_null (basic_authorization);
+ GNUNET_free (basic_authorization);
handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
handle->response_code = MHD_HTTP_UNAUTHORIZED;
return GNUNET_SYSERR;
@@ -1826,7 +1826,7 @@ check_authorization (struct RequestHandle *handle,
{
if (0 != strcmp (expected_pass, pass))
{
- GNUNET_free_non_null (basic_authorization);
+ GNUNET_free (basic_authorization);
GNUNET_free (expected_pass);
handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
handle->response_code = MHD_HTTP_UNAUTHORIZED;
@@ -1836,7 +1836,7 @@ check_authorization (struct RequestHandle *handle,
}
else
{
- GNUNET_free_non_null (basic_authorization);
+ GNUNET_free (basic_authorization);
handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_SERVER_ERROR);
handle->edesc = GNUNET_strdup ("gnunet configuration failed");
handle->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
@@ -1852,7 +1852,7 @@ check_authorization (struct RequestHandle *handle,
}
if (NULL == handle->ego_entry)
{
- GNUNET_free_non_null (basic_authorization);
+ GNUNET_free (basic_authorization);
handle->emsg = GNUNET_strdup (OIDC_ERROR_KEY_INVALID_CLIENT);
handle->response_code = MHD_HTTP_UNAUTHORIZED;
return GNUNET_SYSERR;
@@ -2504,7 +2504,7 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
while (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL,
value))
- GNUNET_free_non_null (value);
+ GNUNET_free (value);
GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
GNUNET_CONTAINER_multihashmap_destroy (OIDC_cookie_jar_map);
@@ -2513,10 +2513,10 @@ libgnunet_plugin_rest_openid_connect_done (void *cls)
while (GNUNET_YES ==
GNUNET_CONTAINER_multihashmap_iterator_next (hashmap_it, NULL,
value))
- GNUNET_free_non_null (value);
+ GNUNET_free (value);
GNUNET_CONTAINER_multihashmap_destroy (OIDC_access_token_map);
GNUNET_CONTAINER_multihashmap_iterator_destroy (hashmap_it);
- GNUNET_free_non_null (allow_methods);
+ GNUNET_free (allow_methods);
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"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)
plugin->cfg = NULL;
- GNUNET_free_non_null (allow_methods);
+ GNUNET_free (allow_methods);
GNUNET_free (api);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"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,
}
GNUNET_CONTAINER_DLL_remove (h->op_head, h->op_tail, op);
free_op (op);
- GNUNET_free_non_null (attrs);
+ GNUNET_free (attrs);
return;
}
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)
search_str_cnt < num_peers && NULL != search_strings;
search_str_cnt++)
{
- GNUNET_free_non_null (search_strings[search_str_cnt]);
+ GNUNET_free (search_strings[search_str_cnt]);
}
- GNUNET_free_non_null (search_strings);
+ GNUNET_free (search_strings);
search_strings = NULL;
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)
static void
free_meter (struct ProgressMeter *meter)
{
- GNUNET_free_non_null (meter->startup_string);
+ GNUNET_free (meter->startup_string);
GNUNET_free (meter);
}
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,
if (transition->from_state != state)
return;
- GNUNET_free_non_null (transition->label);
+ GNUNET_free (transition->label);
state->transition_count--;
GNUNET_CONTAINER_DLL_remove (state->transitions_head,
@@ -310,8 +310,8 @@ automaton_destroy_state (struct REGEX_INTERNAL_State *s)
if (NULL == s)
return;
- GNUNET_free_non_null (s->name);
- GNUNET_free_non_null (s->proof);
+ GNUNET_free (s->name);
+ GNUNET_free (s->proof);
state_set_clear (&s->nfa_set);
for (t = s->transitions_head; NULL != t; t = next_t)
{
@@ -658,7 +658,7 @@ sb_realloc (struct StringBuffer *ret, size_t nlen)
ret->blen = nlen;
GNUNET_memcpy (ret->abuf, ret->sbuf, ret->slen);
ret->sbuf = ret->abuf;
- GNUNET_free_non_null (old);
+ GNUNET_free (old);
}
@@ -726,7 +726,7 @@ sb_wrap (struct StringBuffer *ret, const char *format, size_t extra_chars)
format,
(int) ret->slen,
ret->sbuf);
- GNUNET_free_non_null (ret->abuf);
+ GNUNET_free (ret->abuf);
ret->abuf = temp;
ret->sbuf = temp;
ret->blen = ret->slen + extra_chars + 1;
@@ -1592,8 +1592,8 @@ automaton_create_proofs (struct REGEX_INTERNAL_Automaton *a)
if ((NULL == R_last) || (NULL == R_cur))
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "malloc");
- GNUNET_free_non_null (R_cur);
- GNUNET_free_non_null (R_last);
+ GNUNET_free (R_cur);
+ GNUNET_free (R_last);
return GNUNET_SYSERR;
}
@@ -2159,7 +2159,7 @@ dfa_add_multi_strides_helper (void *cls,
t->to_state);
}
}
- GNUNET_free_non_null (label);
+ GNUNET_free (label);
}
@@ -2213,7 +2213,7 @@ REGEX_INTERNAL_dfa_add_multi_strides (struct REGEX_INTERNAL_Context *regex_ctx,
t_next = t->next;
state_add_transition (regex_ctx, t->from_state, t->label, t->to_state);
GNUNET_CONTAINER_DLL_remove (ctx.transitions_head, ctx.transitions_tail, t);
- GNUNET_free_non_null (t->label);
+ GNUNET_free (t->label);
GNUNET_free (t);
}
@@ -2361,7 +2361,7 @@ dfa_compress_paths (struct REGEX_INTERNAL_Context *regex_ctx,
t_next = t->next;
state_add_transition (regex_ctx, t->from_state, t->label, t->to_state);
GNUNET_CONTAINER_DLL_remove (transitions_head, transitions_tail, t);
- GNUNET_free_non_null (t->label);
+ GNUNET_free (t->label);
GNUNET_free (t);
}
@@ -2972,7 +2972,7 @@ error:
if (NULL != error_msg)
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s\n", error_msg);
- GNUNET_free_non_null (p);
+ GNUNET_free (p);
while (NULL != (nfa = ctx.stack_head))
{
@@ -3133,8 +3133,8 @@ REGEX_INTERNAL_automaton_destroy (struct REGEX_INTERNAL_Automaton *a)
if (NULL == a)
return;
- GNUNET_free_non_null (a->regex);
- GNUNET_free_non_null (a->canonical_regex);
+ GNUNET_free (a->regex);
+ GNUNET_free (a->canonical_regex);
for (s = a->states_head; NULL != s; s = next_state)
{
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)
else
{
GNUNET_asprintf (&tmp, "%s%s|", regex, s);
- GNUNET_free_non_null (regex);
+ GNUNET_free (regex);
regex = tmp;
}
- GNUNET_free_non_null (s);
+ GNUNET_free (s);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, " so far '%s' for inner %s\n", regex,
ctx->s);
}
@@ -517,7 +517,7 @@ regex_ctx_destroy (struct RegexCombineCtx *ctx)
{
regex_ctx_destroy (ctx->children[i]);
}
- GNUNET_free_non_null (ctx->s); /* 's' on root node is null */
+ GNUNET_free (ctx->s); /* 's' on root node is null */
GNUNET_free (ctx->children);
GNUNET_free (ctx);
}
@@ -632,7 +632,7 @@ REGEX_TEST_read_from_file (const char *filename)
regex = NULL;
}
while (offset < size);
- GNUNET_free_non_null (regex);
+ GNUNET_free (regex);
GNUNET_free (buffer);
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,
return result;
error:
- GNUNET_free_non_null (matching_str);
- GNUNET_free_non_null (rand_rx);
- GNUNET_free_non_null (canonical_regex);
+ GNUNET_free (matching_str);
+ GNUNET_free (rand_rx);
+ GNUNET_free (canonical_regex);
return -1;
}
@@ -371,7 +371,7 @@ main (int argc, char *argv[])
REGEX_INTERNAL_automaton_destroy (a);
if (0 != check_dfa)
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "check_proof: %s\n", check_proof);
- GNUNET_free_non_null (check_proof);
+ GNUNET_free (check_proof);
regfree (&rx);
}
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)
static int
cleanup_url_map (void *cls, const struct GNUNET_HashCode *key, void *value)
{
- GNUNET_free_non_null (value);
+ GNUNET_free (value);
return GNUNET_YES;
}
@@ -728,8 +728,8 @@ do_shutdown (void *cls)
{
GNUNET_log (GNUNET_ERROR_TYPE_INFO, "Shutting down...\n");
kill_httpd ();
- GNUNET_free_non_null (allow_credentials);
- GNUNET_free_non_null (allow_headers);
+ GNUNET_free (allow_credentials);
+ GNUNET_free (allow_headers);
}
@@ -1055,7 +1055,7 @@ main (int argc, char *const *argv)
? 0
: 1;
MHD_destroy_response (failure_response);
- GNUNET_free_non_null ((char *) argv);
+ GNUNET_free_nz ((char *) argv);
return ret;
}
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,
// peers = (struct GNUNET_PeerIdentity *) &msg[1];
num_peers = ntohl (msg->num_peers);
srh_callback_num_peers = num_peers;
- GNUNET_free_non_null (srh_callback_peers);
+ GNUNET_free (srh_callback_peers);
srh_callback_peers = GNUNET_new_array (num_peers,
struct GNUNET_PeerIdentity);
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,
{
struct ElementEntry *ee = value;
- GNUNET_free_non_null (ee->mutations);
+ GNUNET_free (ee->mutations);
GNUNET_free (ee);
return GNUNET_YES;
}
@@ -570,7 +570,7 @@ client_disconnect_cb (void *cls,
content->elements = NULL;
GNUNET_free (content);
}
- GNUNET_free_non_null (set->excluded_generations);
+ GNUNET_free (set->excluded_generations);
set->excluded_generations = NULL;
/* 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,
if (buf_len != se->strata_count * se->ibf_size * IBF_BUCKET_SIZE)
{
GNUNET_break (0); /* very odd error */
- GNUNET_free_non_null (dbuf);
+ GNUNET_free (dbuf);
return GNUNET_SYSERR;
}
@@ -129,7 +129,7 @@ strata_estimator_read (const void *buf,
ibf_read_slice (buf, 0, se->ibf_size, se->strata[i]);
buf += se->ibf_size * IBF_BUCKET_SIZE;
}
- GNUNET_free_non_null (dbuf);
+ GNUNET_free (dbuf);
return GNUNET_OK;
}
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 ()
total,
fn);
}
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
}
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)
GNUNET_array_grow (nodes,
num_nodes,
0);
- GNUNET_free_non_null (remote_host);
+ GNUNET_free (remote_host);
GNUNET_free_nz ((void *) argv);
return ret;
}
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,
static void
free_action_item (struct GNUNET_STATISTICS_GetHandle *gh)
{
- GNUNET_free_non_null (gh->subsystem);
- GNUNET_free_non_null (gh->name);
+ GNUNET_free (gh->subsystem);
+ GNUNET_free (gh->name);
GNUNET_free (gh);
}
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 ()
{
CANCEL_TASK (abort_task);
CANCEL_TASK (write_task);
- GNUNET_free_non_null (search_dir);
+ GNUNET_free (search_dir);
if (NULL != h)
GNUNET_TESTBED_LOGGER_disconnect (h);
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)
GNUNET_free (evstr);
evstr = NULL;
}
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
hostname = NULL;
GNUNET_assert (NULL != test_system);
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,
GNUNET_strlcpy (hostname, ptr, hostname_length + 1);
if (NULL == (host_cfg = GNUNET_TESTBED_extract_config_ (&msg->header)))
{
- GNUNET_free_non_null (username);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (username);
+ GNUNET_free (hostname);
GNUNET_break_op (0);
GNUNET_SERVICE_client_drop (client);
return;
@@ -570,7 +570,7 @@ handle_add_host (void *cls,
username,
host_cfg,
ntohs (msg->ssh_port));
- GNUNET_free_non_null (username);
+ GNUNET_free (username);
GNUNET_free (hostname);
GNUNET_CONFIGURATION_destroy (host_cfg);
if (NULL == host)
@@ -757,17 +757,17 @@ shutdown_task (void *cls)
for (id = 0; id < GST_host_list_size; id++)
if (NULL != GST_host_list[id])
GNUNET_TESTBED_host_destroy (GST_host_list[id]);
- GNUNET_free_non_null (GST_host_list);
+ GNUNET_free (GST_host_list);
if (NULL != GST_context)
{
- GNUNET_free_non_null (GST_context->master_ip);
+ GNUNET_free (GST_context->master_ip);
if (NULL != GST_context->system)
GNUNET_TESTING_system_destroy (GST_context->system,
GNUNET_YES);
GNUNET_free (GST_context);
GST_context = NULL;
}
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
/* Free hello cache */
GST_cache_clear ();
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
free_entry (struct CacheEntry *entry)
{
GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, entry);
- GNUNET_free_non_null (entry->hello);
+ GNUNET_free (entry->hello);
GNUNET_free (entry);
}
@@ -261,7 +261,7 @@ GST_cache_add_hello (const unsigned int peer_id,
entry = cache_lookup (peer_id);
if (NULL == entry)
entry = add_entry (peer_id);
- GNUNET_free_non_null (entry->hello);
+ GNUNET_free (entry->hello);
entry->hello = GNUNET_copy_message (hello);
}
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)
return;
GNUNET_CORE_disconnect (entry->handle_core);
entry->handle_core = NULL;
- GNUNET_free_non_null (entry->peer_identity);
+ GNUNET_free (entry->peer_identity);
entry->peer_identity = NULL;
}
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 ()
proc_stat = NULL;
}
#elif OSX
- GNUNET_free_non_null (prev_cpu_load);
+ GNUNET_free (prev_cpu_load);
#endif
if (NULL != sample_load_task_id)
{
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 ()
for (id = 0; id < route_list_size; id++)
if (NULL != route_list[id])
GNUNET_free (route_list[id]);
- GNUNET_free_non_null (route_list);
+ GNUNET_free (route_list);
route_list = NULL;
}
@@ -508,7 +508,7 @@ GST_slave_list_clear ()
continue;
destroy_slave (slave);
}
- GNUNET_free_non_null (GST_slave_list);
+ GNUNET_free (GST_slave_list);
GST_slave_list = NULL;
}
@@ -1104,7 +1104,7 @@ GST_neighbour_list_clean ()
GNUNET_free (n);
neighbour_list[id] = NULL;
}
- GNUNET_free_non_null (neighbour_list);
+ GNUNET_free (neighbour_list);
}
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)
GNUNET_CONTAINER_DLL_remove (rhc->focc_dll_head,
rhc->focc_dll_tail,
focc);
- GNUNET_free_non_null (focc->orig_msg);
+ GNUNET_free (focc->orig_msg);
GNUNET_free (focc);
}
@@ -536,8 +536,8 @@ cleanup_occ (struct OverlayConnectContext *occ)
LOG_DEBUG ("0x%llx: Cleaning up occ\n",
occ->op_id);
- GNUNET_free_non_null (occ->emsg);
- GNUNET_free_non_null (occ->hello);
+ GNUNET_free (occ->emsg);
+ GNUNET_free (occ->hello);
if (NULL != occ->send_hello_task)
GNUNET_SCHEDULER_cancel (occ->send_hello_task);
if (NULL != occ->cleanup_task)
@@ -727,7 +727,7 @@ overlay_connect_notify (void *cls,
cleanup_occ_rp2c (&occ->p2ctx.remote);
break;
}
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
occ->emsg = NULL;
send_overlay_connect_success_msg (occ);
occ->cleanup_task = GNUNET_SCHEDULER_add_now (&do_cleanup_occ,
@@ -758,7 +758,7 @@ occ_cache_get_handle_ats_occ_cb (void *cls,
GNUNET_assert (OCC_TYPE_LOCAL == occ->type);
GNUNET_assert (NULL != occ->timeout_task);
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
if (NULL == ac)
{
GNUNET_asprintf (&occ->emsg,
@@ -842,7 +842,7 @@ occ_hello_sent_cb (void *cls)
lp2c->ohh = NULL;
GNUNET_assert (NULL == occ->send_hello_task);
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
GNUNET_asprintf (&occ->emsg,
"0x%llx: Timeout while acquiring ATS of %s from cache",
@@ -1092,7 +1092,7 @@ hello_update_cb (void *cls,
GST_connection_pool_get_handle_done (occ->cgh_p1th);
occ->cgh_p1th = NULL;
occ->p1th_ = NULL;
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
occ->emsg = NULL;
p2_transport_connect (occ);
}
@@ -1118,7 +1118,7 @@ p1_transport_connect_cache_callback (void *cls,
{
struct OverlayConnectContext *occ = cls;
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
occ->emsg = NULL;
if (NULL == th)
{
@@ -1166,7 +1166,7 @@ occ_cache_get_handle_core_cb (void *cls,
const struct GNUNET_MessageHeader *hello;
GNUNET_assert (NULL != occ->timeout_task);
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
if ((NULL == ch) || (NULL == my_identity))
{
GNUNET_asprintf (&occ->emsg,
@@ -1249,7 +1249,7 @@ overlay_connect_get_config (void *cls,
cmsg =
(const struct GNUNET_TESTBED_PeerConfigurationInformationMessage *) msg;
occ->other_peer_identity = cmsg->peer_identity;
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
GNUNET_asprintf (&occ->emsg,
"0x%llx: Timeout while connecting to CORE of peer with "
"id: %u",
@@ -1508,7 +1508,7 @@ p2_controller_connect_cb (void *cls,
&cmsg.header,
&overlay_connect_get_config,
occ);
- GNUNET_free_non_null (occ->emsg);
+ GNUNET_free (occ->emsg);
GNUNET_asprintf (&occ->emsg,
"0x%llx: Timeout while getting peer identity of peer "
"with id: %u",
@@ -1674,7 +1674,7 @@ cleanup_rocc (struct RemoteOverlayConnectCtx *rocc)
if ((GNUNET_YES == rocc->peer->destroy_flag) &&
(0 == rocc->peer->reference_cnt))
GST_destroy_peer (rocc->peer);
- GNUNET_free_non_null (rocc->hello);
+ GNUNET_free (rocc->hello);
GNUNET_CONTAINER_DLL_remove (roccq_head,
roccq_tail,
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,
GST_send_operation_success_msg (client,
op_id);
GNUNET_SERVICE_client_continue (client);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
return;
}
prc = GNUNET_new (struct PeerReconfigureContext);
@@ -1264,7 +1264,7 @@ ret:
else
GST_send_operation_success_msg (mctx->client,
mctx->op_id);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
cleanup_mctx (mctx);
}
@@ -1459,7 +1459,7 @@ GST_destroy_peers ()
}
GNUNET_free (peer);
}
- GNUNET_free_non_null (GST_peer_list);
+ GNUNET_free (GST_peer_list);
GST_peer_list = NULL;
GST_peer_list_size = 0;
}
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[])
GNUNET_SIGNAL_handler_uninstall (shc_chld);
shc_chld = NULL;
GNUNET_DISK_pipe_close (sigpipe);
- GNUNET_free_non_null (fn);
+ GNUNET_free (fn);
if (GNUNET_OK != ret)
return ret;
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)
GNUNET_SCHEDULER_cancel (abort_task);
if (NULL != helper)
GNUNET_HELPER_stop (helper, GNUNET_NO);
- GNUNET_free_non_null (msg);
+ GNUNET_free (msg);
if (NULL != cfg)
GNUNET_CONFIGURATION_destroy (cfg);
}
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)
NUM_PEERS,
1LL, NULL, NULL,
&test_master, NULL);
- GNUNET_free_non_null (seen_peers);
+ GNUNET_free (seen_peers);
if (GNUNET_OK != result)
return 1;
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 (
LOG_DEBUG ("Not calling callback\n");
if (NULL != cfg)
GNUNET_CONFIGURATION_destroy (cfg);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
}
@@ -1314,7 +1314,7 @@ handle_barrier_status (void *cls,
return; /* just initialised; skip cleanup */
cleanup:
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
/**
* Do not remove the barrier if we did not echo the status back; this is
* required at the chained testbed controller setup to ensure the only the
@@ -1459,7 +1459,7 @@ oprelease_link_controllers (void *cls)
case OPC_STATE_FINISHED:
break;
}
- GNUNET_free_non_null (data);
+ GNUNET_free (data);
GNUNET_free (opc);
}
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 (
else
(void) GNUNET_TESTBED_host_create (hostname, username, cfg, port);
count++;
- GNUNET_free_non_null (username);
+ GNUNET_free (username);
GNUNET_free (hostname);
buf = &data[offset + 1];
}
@@ -611,26 +611,27 @@ GNUNET_TESTBED_hosts_load_from_loadleveler (
void
GNUNET_TESTBED_host_destroy (struct GNUNET_TESTBED_Host *host)
{
- struct RegisteredController *rc;
- uint32_t id;
-
GNUNET_assert (host->id < host_list_size);
GNUNET_assert (host_list[host->id] == host);
host_list[host->id] = NULL;
/* clear registered controllers list */
- for (rc = host->rc_head; NULL != rc; rc = host->rc_head)
+ for (struct RegisteredController *rc = host->rc_head;
+ NULL != rc;
+ rc = host->rc_head)
{
GNUNET_CONTAINER_DLL_remove (host->rc_head, host->rc_tail, rc);
GNUNET_free (rc);
}
- GNUNET_free_non_null ((char *) host->username);
- GNUNET_free_non_null ((char *) host->hostname);
+ GNUNET_free_nz ((char *) host->username);
+ GNUNET_free_nz ((char *) host->hostname);
GNUNET_TESTBED_operation_queue_destroy_ (
host->opq_parallel_overlay_connect_operations);
GNUNET_CONFIGURATION_destroy (host->cfg);
GNUNET_free (host);
while (host_list_size >= HOST_LIST_GROW_STEP)
{
+ uint32_t id;
+
for (id = host_list_size - 1; id > host_list_size - HOST_LIST_GROW_STEP;
id--)
if (NULL != host_list[id])
@@ -1223,7 +1224,7 @@ GNUNET_TESTBED_controller_destroy_ (struct GNUNET_TESTBED_ControllerProc *cproc)
free_argv (cproc->helper_argv);
cproc->host->controller_started = GNUNET_NO;
cproc->host->locked = GNUNET_NO;
- GNUNET_free_non_null (cproc->msg);
+ GNUNET_free (cproc->msg);
GNUNET_free (cproc);
}
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,
}
ret:
- GNUNET_free_non_null (evict_entries);
+ GNUNET_free (evict_entries);
if (NULL != ops_)
*ops_ = ops;
else
@@ -771,7 +771,7 @@ check_readiness (struct GNUNET_TESTBED_Operation *op)
if (GNUNET_NO == decide_capacity (op->queues[i], op->qentries[i],
&ops, &n_ops))
{
- GNUNET_free_non_null (evict_ops);
+ GNUNET_free (evict_ops);
return GNUNET_NO;
}
if (NULL == ops)
@@ -842,7 +842,7 @@ cleanup_tslots (struct OperationQueue *queue)
continue;
GNUNET_CONTAINER_DLL_remove (op->tslots_head, op->tslots_tail, tslot);
}
- GNUNET_free_non_null (fctx->tslots_freeptr);
+ GNUNET_free (fctx->tslots_freeptr);
fctx->tslots_freeptr = NULL;
fctx->alloc_head = NULL;
fctx->alloc_tail = NULL;
@@ -1337,7 +1337,7 @@ GNUNET_TESTBED_operation_release_ (struct GNUNET_TESTBED_Operation *op)
}
GNUNET_free (entry);
}
- GNUNET_free_non_null (op->qentries);
+ GNUNET_free (op->qentries);
GNUNET_free (op->queues);
GNUNET_free (op->nres);
if (NULL != op->release)
@@ -1376,7 +1376,7 @@ GNUNET_TESTBED_operations_fini ()
warn = 1;
queue_destroy (queue);
}
- GNUNET_free_non_null (expired_opqs);
+ GNUNET_free (expired_opqs);
n_expired_opqs = 0;
if (warn)
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)
case OPC_STATE_FINISHED:
break;
}
- GNUNET_free_non_null (data);
+ GNUNET_free (data);
GNUNET_free (opc);
}
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)
}
GNUNET_free (sc->ops);
}
- GNUNET_free_non_null (sc->subsystem);
- GNUNET_free_non_null (sc->name);
+ GNUNET_free (sc->subsystem);
+ GNUNET_free (sc->name);
GNUNET_free (sc);
if (GNUNET_YES ==
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)
GNUNET_TESTBED_host_destroy (rc->h);
for (hid = 0; hid < rc->num_hosts; hid++)
GNUNET_TESTBED_host_destroy (rc->hosts[hid]);
- GNUNET_free_non_null (rc->hosts);
+ GNUNET_free (rc->hosts);
if (NULL != rc->cfg)
GNUNET_CONFIGURATION_destroy (rc->cfg);
- GNUNET_free_non_null (rc->topo_file);
- GNUNET_free_non_null (rc->trusted_ip);
+ GNUNET_free (rc->topo_file);
+ GNUNET_free (rc->trusted_ip);
GNUNET_free (rc);
}
@@ -863,7 +863,7 @@ event_cb (void *cls, const struct GNUNET_TESTBED_EventInformation *event)
case RC_PEERS_CREATED:
case RC_READY:
rc->state = RC_PEERS_SHUTDOWN;
- GNUNET_free_non_null (rc->peers);
+ GNUNET_free (rc->peers);
rc->peers = NULL;
DEBUG ("Peers shut down in %s\n", prof_time (rc));
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:
struct TopologyContextOverlay *overlay;
overlay = &tc->u.overlay;
- GNUNET_free_non_null (overlay->link_array);
+ GNUNET_free (overlay->link_array);
overlay->link_array = NULL;
}
break;
@@ -1193,7 +1193,7 @@ _exit:
struct TopologyContextUnderlay *underlay;
underlay = &tc->u.underlay;
- GNUNET_free_non_null (underlay->link_array);
+ GNUNET_free (underlay->link_array);
underlay->link_array = NULL;
}
break;
@@ -1428,7 +1428,7 @@ GNUNET_TESTBED_overlay_configure_topology_va (void *op_cls,
default:
GNUNET_break (0); /* Should not use any other option apart from
* the ones handled here */
- GNUNET_free_non_null (overlay->link_array);
+ GNUNET_free (overlay->link_array);
GNUNET_free (tc);
return NULL;
}
@@ -1653,7 +1653,7 @@ GNUNET_TESTBED_underlay_construct_ (int num_peers,
break;
}
}
- GNUNET_free_non_null (underlay->link_array);
+ GNUNET_free (underlay->link_array);
return ret;
}
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,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Extracting hostkey %u\n", create_no);
ret = create_hostkeys (create_no);
}
- GNUNET_free_non_null (create_cfg_template);
+ GNUNET_free (create_cfg_template);
}
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,
end:
GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
}
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,
end:
FAIL_TEST (0);
GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
}
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,
end:
GNUNET_SCHEDULER_add_now (&do_shutdown, test_ctx);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
}
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)
(void) unlink (i->cfg_fn);
GNUNET_free (i->cfg_fn);
}
- GNUNET_free_non_null (i->unix_sock);
- GNUNET_free_non_null (i->port_str);
+ GNUNET_free (i->unix_sock);
+ GNUNET_free (i->port_str);
GNUNET_break (NULL == i->proc);
GNUNET_break (0 == i->n_refs);
GNUNET_free (i);
@@ -551,17 +551,17 @@ GNUNET_TESTING_system_destroy (struct GNUNET_TESTING_System *system,
stop_shared_service_instance (i);
cleanup_shared_service_instance (i);
}
- GNUNET_free_non_null (ss->instances);
+ GNUNET_free (ss->instances);
GNUNET_CONFIGURATION_destroy (ss->cfg);
GNUNET_free (ss->sname);
GNUNET_free (ss);
}
- GNUNET_free_non_null (system->shared_services);
+ GNUNET_free (system->shared_services);
if (GNUNET_YES == remove_paths)
GNUNET_DISK_directory_remove (system->tmppath);
GNUNET_free (system->tmppath);
- GNUNET_free_non_null (system->trusted_ip);
- GNUNET_free_non_null (system->hostname);
+ GNUNET_free (system->trusted_ip);
+ GNUNET_free (system->hostname);
GNUNET_free (system);
}
@@ -957,7 +957,7 @@ update_config_sections (void *cls, const char *section)
}
GNUNET_free (ikeys);
}
- GNUNET_free_non_null (val);
+ GNUNET_free (val);
ACCEPT_FROM_key = "ACCEPT_FROM";
if ((NULL != uc->system->trusted_ip) &&
(NULL != strstr (uc->system->trusted_ip, ":"))) /* IPv6 in use */
@@ -1120,7 +1120,7 @@ GNUNET_TESTING_configuration_create_ (struct GNUNET_TESTING_System *system,
*nports = uc.nports;
}
else
- GNUNET_free_non_null (uc.ports);
+ GNUNET_free (uc.ports);
return uc.status;
}
@@ -1316,8 +1316,8 @@ GNUNET_TESTING_peer_configure (struct GNUNET_TESTING_System *system,
return peer;
err_ret:
- GNUNET_free_non_null (ss_instances);
- GNUNET_free_non_null (ports);
+ GNUNET_free (ss_instances);
+ GNUNET_free (ports);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "%s", emsg_);
if (NULL != emsg)
*emsg = emsg_;
@@ -1566,8 +1566,8 @@ GNUNET_TESTING_peer_destroy (struct GNUNET_TESTING_Peer *peer)
GNUNET_CONFIGURATION_destroy (peer->cfg);
GNUNET_free (peer->main_binary);
GNUNET_free (peer->args);
- GNUNET_free_non_null (peer->id);
- GNUNET_free_non_null (peer->ss_instances);
+ GNUNET_free (peer->id);
+ GNUNET_free (peer->ss_instances);
if (NULL != peer->ports)
{
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)
}
if (NULL != pos->hello)
{
- GNUNET_free_non_null (pos->hello);
+ GNUNET_free (pos->hello);
pos->hello = NULL;
}
if (NULL != pos->filter)
@@ -812,7 +812,7 @@ process_peer (void *cls,
pos = GNUNET_CONTAINER_multipeermap_get (peers, peer);
if (NULL != pos)
{
- GNUNET_free_non_null (pos->hello);
+ GNUNET_free (pos->hello);
pos->hello = NULL;
if (NULL != pos->filter)
{
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)
GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi);
GNUNET_SCHEDULER_cancel (bi->broadcast_task);
GNUNET_free (bi->sa);
- GNUNET_free_non_null (bi->ba);
+ GNUNET_free (bi->ba);
GNUNET_free (bi);
}
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,
{
char *be = value;
- GNUNET_free_non_null (be);
+ GNUNET_free (be);
return GNUNET_OK;
}
@@ -2511,7 +2511,7 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc)
GNUNET_SCHEDULER_cancel (bc->task);
bc->task = NULL;
}
- GNUNET_free_non_null (bc->address);
+ GNUNET_free (bc->address);
GNUNET_free (bc);
}
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)
gc.addr_pos = oal_head;
gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration);
- GNUNET_free_non_null (our_hello);
+ GNUNET_free (our_hello);
our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key,
&address_generator,
&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)
GNUNET_assert (
GNUNET_OK ==
GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value));
- GNUNET_free_non_null (m->address);
+ GNUNET_free (m->address);
GNUNET_free (value);
return GNUNET_OK;
}
@@ -1037,7 +1037,7 @@ plugin_monitoring_cb (void *cls,
GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
addr->asc = NULL;
}
- GNUNET_free_non_null (addr->str);
+ GNUNET_free (addr->str);
GNUNET_free (addr);
*session_ctx = NULL;
}
@@ -1069,7 +1069,7 @@ plugin_monitoring_cb (void *cls,
GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
addr->asc = NULL;
}
- GNUNET_free_non_null (addr->str);
+ GNUNET_free (addr->str);
GNUNET_free (addr);
*session_ctx = NULL;
}
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)
_ ("Shutdown for plugin `%s' complete\n"),
plugin->name);
GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions);
- GNUNET_free_non_null (plugin->proxy_hostname);
- GNUNET_free_non_null (plugin->proxy_username);
- GNUNET_free_non_null (plugin->proxy_password);
+ GNUNET_free (plugin->proxy_hostname);
+ GNUNET_free (plugin->proxy_username);
+ GNUNET_free (plugin->proxy_password);
GNUNET_free (plugin);
GNUNET_free (api);
return NULL;
@@ -2304,9 +2304,9 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
GNUNET_free (proxy_type);
GNUNET_free (plugin->proxy_hostname);
plugin->proxy_hostname = NULL;
- GNUNET_free_non_null (plugin->proxy_username);
+ GNUNET_free (plugin->proxy_username);
plugin->proxy_username = NULL;
- GNUNET_free_non_null (plugin->proxy_password);
+ GNUNET_free (plugin->proxy_password);
plugin->proxy_password = NULL;
return GNUNET_SYSERR;
@@ -2325,7 +2325,7 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel)
plugin->proxy_use_httpproxytunnel = GNUNET_NO;
- GNUNET_free_non_null (proxy_type);
+ GNUNET_free (proxy_type);
}
/* 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)
{
if (NULL != spa)
{
- GNUNET_free_non_null (spa->protocol);
- GNUNET_free_non_null (spa->host);
- GNUNET_free_non_null (spa->path);
- GNUNET_free_non_null (spa);
+ GNUNET_free (spa->protocol);
+ GNUNET_free (spa->host);
+ GNUNET_free (spa->path);
+ GNUNET_free (spa);
}
}
@@ -494,7 +494,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
asc (asc_cls, NULL, GNUNET_OK);
http_clean_splitted (saddr);
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
return;
}
if ((GNUNET_YES == numeric) &&
@@ -510,7 +510,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
goto handle_error;
}
/* Wait for resolver callback */
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
return;
}
if ((GNUNET_NO == numeric) &&
@@ -531,7 +531,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
goto handle_error;
}
/* Wait for resolver callback */
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
return;
}
if ((GNUNET_NO == numeric) &&
@@ -541,7 +541,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
ret = http_common_plugin_address_to_string (type, address, addrlen);
asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
asc (asc_cls, NULL, GNUNET_OK);
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
http_clean_splitted (saddr);
return;
}
@@ -553,7 +553,7 @@ handle_error:
/* Report error */
asc (asc_cls, NULL, GNUNET_SYSERR);
asc (asc_cls, NULL, GNUNET_OK);
- GNUNET_free_non_null (sock_addr);
+ GNUNET_free (sock_addr);
if (NULL != saddr)
http_clean_splitted (saddr);
}
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,
http_common_plugin_address_to_string (plugin->protocol,
addr,
addr_len));
- GNUNET_free_non_null (addr);
+ GNUNET_free (addr);
}
if ((_RECEIVE == direction) &&
@@ -2179,9 +2179,9 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
{
struct GNUNET_OS_Process *cert_creation;
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->key);
plugin->key = NULL;
- GNUNET_free_non_null (plugin->cert);
+ GNUNET_free (plugin->cert);
plugin->cert = NULL;
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2203,11 +2203,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
GNUNET_free (key_file);
GNUNET_free (cert_file);
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->key);
plugin->key = NULL;
- GNUNET_free_non_null (plugin->cert);
+ GNUNET_free (plugin->cert);
plugin->cert = NULL;
- GNUNET_free_non_null (plugin->crypto_init);
+ GNUNET_free (plugin->crypto_init);
plugin->crypto_init = NULL;
return GNUNET_SYSERR;
@@ -2228,11 +2228,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
GNUNET_free (key_file);
GNUNET_free (cert_file);
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->key);
plugin->key = NULL;
- GNUNET_free_non_null (plugin->cert);
+ GNUNET_free (plugin->cert);
plugin->cert = NULL;
- GNUNET_free_non_null (plugin->crypto_init);
+ GNUNET_free (plugin->crypto_init);
plugin->crypto_init = NULL;
return GNUNET_SYSERR;
@@ -2871,8 +2871,8 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin)
GNUNET_assert (NULL != addrs[res]);
GNUNET_free (addrs[res]);
}
- GNUNET_free_non_null (addrs);
- GNUNET_free_non_null (addrlens);
+ GNUNET_free (addrs);
+ GNUNET_free (addrlens);
}
@@ -3316,9 +3316,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
plugin->server_v6_task = NULL;
}
#if BUILD_HTTPS
- GNUNET_free_non_null (plugin->crypto_init);
- GNUNET_free_non_null (plugin->cert);
- GNUNET_free_non_null (plugin->key);
+ GNUNET_free (plugin->crypto_init);
+ GNUNET_free (plugin->cert);
+ GNUNET_free (plugin->key);
#endif
GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions,
&destroy_session_shutdown_cb,
@@ -3336,10 +3336,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
plugin->server_v6 = NULL;
}
/* Clean up */
- GNUNET_free_non_null (plugin->external_hostname);
- GNUNET_free_non_null (plugin->ext_addr);
- GNUNET_free_non_null (plugin->server_addr_v4);
- GNUNET_free_non_null (plugin->server_addr_v6);
+ GNUNET_free (plugin->external_hostname);
+ GNUNET_free (plugin->ext_addr);
+ GNUNET_free (plugin->server_addr_v4);
+ GNUNET_free (plugin->server_addr_v6);
regfree (&plugin->url_regex);
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,
(EACCES == errno))
{
GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
@@ -1212,7 +1212,7 @@ get_server_addresses (const char *service_name,
_ (
"Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
service_name);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return GNUNET_SYSERR;
}
if (0 == port)
@@ -1220,8 +1220,8 @@ get_server_addresses (const char *service_name,
saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
add_unixpath (saddrs, saddrlens, unixpath, abstract);
- GNUNET_free_non_null (unixpath);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (unixpath);
+ GNUNET_free (hostname);
*addrs = saddrs;
*addr_lens = saddrlens;
return 1;
@@ -1245,7 +1245,7 @@ get_server_addresses (const char *service_name,
hostname,
gai_strerror (ret));
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
next = res;
@@ -1265,7 +1265,7 @@ get_server_addresses (const char *service_name,
hostname);
freeaddrinfo (res);
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
resi = i;
@@ -1372,7 +1372,7 @@ get_server_addresses (const char *service_name,
((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
}
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
*addrs = saddrs;
*addr_lens = saddrlens;
return resi;
@@ -3163,7 +3163,7 @@ handle_tcp_welcome (void *cls,
else
{
GNUNET_break (0);
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
return;
}
@@ -3267,7 +3267,7 @@ handle_tcp_data (void *cls,
GNUNET_a2s (vaddr, alen));
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
return;
}
if (GNUNET_YES == session->expecting_welcome)
@@ -3284,7 +3284,7 @@ handle_tcp_data (void *cls,
GNUNET_a2s (vaddr, alen));
GNUNET_break_op (0);
GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
return;
}
@@ -3300,7 +3300,7 @@ handle_tcp_data (void *cls,
(unsigned int) ntohs (message->type),
GNUNET_i2s (&session->target),
GNUNET_a2s (vaddr, alen));
- GNUNET_free_non_null (vaddr);
+ GNUNET_free (vaddr);
}
GNUNET_STATISTICS_update (plugin->env->stats,
@@ -3802,8 +3802,8 @@ libgnunet_plugin_transport_tcp_init (void *cls)
plugin);
for (ret = ret_s - 1; ret >= 0; ret--)
GNUNET_free (addrs[ret]);
- GNUNET_free_non_null (addrs);
- GNUNET_free_non_null (addrlens);
+ GNUNET_free (addrs);
+ GNUNET_free (addrlens);
}
else
{
@@ -3893,7 +3893,7 @@ die:
if (NULL != service)
LEGACY_SERVICE_stop (service);
GNUNET_free (plugin);
- GNUNET_free_non_null (api);
+ GNUNET_free (api);
return NULL;
}
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)
}
have_bind4 = GNUNET_YES;
}
- GNUNET_free_non_null (bind4_address);
+ GNUNET_free (bind4_address);
have_bind6 = GNUNET_NO;
memset (&server_addrv6, 0, sizeof(server_addrv6));
if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
@@ -3691,7 +3691,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
}
have_bind6 = GNUNET_YES;
}
- GNUNET_free_non_null (bind6_address);
+ GNUNET_free (bind6_address);
enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
"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)
GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer);
plugin->helper_payload_tokenizer = NULL;
}
- GNUNET_free_non_null (plugin->wlan_interface);
+ GNUNET_free (plugin->wlan_interface);
GNUNET_free (plugin);
GNUNET_free (api);
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)
* leak the socket in this special case) ... */
}
}
- GNUNET_free_non_null (connection->addr);
- GNUNET_free_non_null (connection->hostname);
+ GNUNET_free (connection->addr);
+ GNUNET_free (connection->hostname);
GNUNET_free (connection->write_buffer);
GNUNET_free (connection);
}
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 (
(EACCES == errno))
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses (
_ (
"Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
service_name);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return GNUNET_SYSERR;
}
if (0 == port)
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses (
saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
add_unixpath (saddrs, saddrlens, unixpath, abstract);
- GNUNET_free_non_null (unixpath);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (unixpath);
+ GNUNET_free (hostname);
*addrs = saddrs;
*addr_lens = saddrlens;
return 1;
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses (
hostname,
gai_strerror (ret));
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
next = res;
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses (
hostname);
freeaddrinfo (res);
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
resi = i;
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses (
((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
}
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
*addrs = saddrs;
*addr_lens = saddrlens;
return resi;
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
{
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir);
GNUNET_free (rdir);
- GNUNET_free_non_null (user);
+ GNUNET_free (user);
GNUNET_free (pif);
return GNUNET_SYSERR;
}
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
{
LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif);
GNUNET_free (pif);
- GNUNET_free_non_null (user);
+ GNUNET_free (user);
return GNUNET_SYSERR;
}
if (0 > fprintf (pidfd, "%u", pid))
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
GNUNET_break (0 == fclose (pidfd));
if ((NULL != user) && (0 < strlen (user)))
GNUNET_DISK_file_change_owner (pif, user);
- GNUNET_free_non_null (user);
+ GNUNET_free (user);
GNUNET_free (pif);
return GNUNET_OK;
}
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc,
/* shutdown */
if ((1 == do_daemonize) && (NULL != sctx.server))
pid_file_delete (&sctx);
- GNUNET_free_non_null (sctx.my_handlers);
+ GNUNET_free (sctx.my_handlers);
shutdown:
if (-1 != sctx.ready_confirm_fd)
@@ -1475,16 +1475,16 @@ shutdown:
if (NULL != sctx.addrs)
while (NULL != sctx.addrs[i])
GNUNET_free_nz (sctx.addrs[i++]);
- GNUNET_free_non_null (sctx.addrs);
- GNUNET_free_non_null (sctx.addrlens);
- GNUNET_free_non_null (logfile);
- GNUNET_free_non_null (loglev);
+ GNUNET_free (sctx.addrs);
+ GNUNET_free (sctx.addrlens);
+ GNUNET_free (logfile);
+ GNUNET_free (loglev);
GNUNET_free (cfg_fn);
- GNUNET_free_non_null (opt_cfg_fn);
- GNUNET_free_non_null (sctx.v4_denied);
- GNUNET_free_non_null (sctx.v6_denied);
- GNUNET_free_non_null (sctx.v4_allowed);
- GNUNET_free_non_null (sctx.v6_allowed);
+ GNUNET_free (opt_cfg_fn);
+ GNUNET_free (sctx.v4_denied);
+ GNUNET_free (sctx.v6_denied);
+ GNUNET_free (sctx.v4_allowed);
+ GNUNET_free (sctx.v6_allowed);
return err ? GNUNET_SYSERR : sctx.ret;
}
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
}
if (NULL != sctx->server)
GNUNET_SERVER_destroy (sctx->server);
- GNUNET_free_non_null (sctx->my_handlers);
+ GNUNET_free (sctx->my_handlers);
if (NULL != sctx->addrs)
{
i = 0;
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
GNUNET_free_nz (sctx->addrs[i++]);
GNUNET_free (sctx->addrs);
}
- GNUNET_free_non_null (sctx->addrlens);
- GNUNET_free_non_null (sctx->v4_denied);
- GNUNET_free_non_null (sctx->v6_denied);
- GNUNET_free_non_null (sctx->v4_allowed);
- GNUNET_free_non_null (sctx->v6_allowed);
+ GNUNET_free (sctx->addrlens);
+ GNUNET_free (sctx->v4_denied);
+ GNUNET_free (sctx->v6_denied);
+ GNUNET_free (sctx->v4_allowed);
+ GNUNET_free (sctx->v6_allowed);
GNUNET_free (sctx);
}
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)
{
if (NULL == addr)
return;
- GNUNET_free_non_null (addr->host);
- GNUNET_free_non_null (addr->path);
- GNUNET_free_non_null (addr->protocol);
+ GNUNET_free (addr->host);
+ GNUNET_free (addr->path);
+ GNUNET_free (addr->protocol);
GNUNET_free (addr);
}
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,
for (unsigned int i = 0; i < num_peers; i++)
GNUNET_free (cfg_names[i]);
GNUNET_free (test_source);
- GNUNET_free_non_null (test_plugin);
+ GNUNET_free (test_plugin);
GNUNET_free (test_name);
return ret;
}
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,
GNUNET_assert (0 == memcmp (&hello_id,
&p->id,
sizeof(hello_id)));
- GNUNET_free_non_null (p->hello);
+ GNUNET_free (p->hello);
p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message);
if (NULL != p->start_cb)
@@ -460,10 +460,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct
cfgname,
emsg);
GNUNET_TRANSPORT_TESTING_stop_peer (p);
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
return NULL;
}
- GNUNET_free_non_null (emsg);
+ GNUNET_free (emsg);
if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer))
{
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,
reconnect (h);
if (NULL == h->mq)
{
- GNUNET_free_non_null (h->handlers);
+ GNUNET_free (h->handlers);
GNUNET_free (h);
return NULL;
}
@@ -792,7 +792,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
}
GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
handle->neighbours = NULL;
- GNUNET_free_non_null (handle->handlers);
+ GNUNET_free (handle->handlers);
handle->handlers = NULL;
GNUNET_free (handle);
}
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,
reconnect (h);
if (NULL == h->mq)
{
- GNUNET_free_non_null (h->handlers);
+ GNUNET_free (h->handlers);
GNUNET_free (h);
return NULL;
}
@@ -922,7 +922,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
}
GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
handle->neighbours = NULL;
- GNUNET_free_non_null (handle->handlers);
+ GNUNET_free (handle->handlers);
handle->handlers = NULL;
GNUNET_free (handle);
}
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)
if (NULL != emsg)
*emsg = h->emsg;
else
- GNUNET_free_non_null (h->emsg);
+ GNUNET_free (h->emsg);
switch (h->type)
{
case IO_FILE:
@@ -345,7 +345,7 @@ GNUNET_BIO_read_string (struct GNUNET_BIO_ReadHandle *h,
GNUNET_asprintf (&h->emsg,
_ ("Error reading length of string `%s'"),
what);
- GNUNET_free_non_null (tmp);
+ GNUNET_free (tmp);
return GNUNET_SYSERR;
}
if (0 == big)
@@ -612,7 +612,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg)
if (NULL != emsg)
*emsg = h->emsg;
else
- GNUNET_free_non_null (h->emsg);
+ GNUNET_free (h->emsg);
switch (h->type)
{
case IO_FILE:
@@ -623,7 +623,7 @@ GNUNET_BIO_write_close (struct GNUNET_BIO_WriteHandle *h, char **emsg)
if (NULL != emsg)
*emsg = h->emsg;
else
- GNUNET_free_non_null (h->emsg);
+ GNUNET_free (h->emsg);
err = GNUNET_SYSERR;
}
else
@@ -663,7 +663,7 @@ GNUNET_BIO_flush (struct GNUNET_BIO_WriteHandle *h)
{
GNUNET_DISK_file_close (h->fd);
h->fd = NULL;
- GNUNET_free_non_null (h->emsg);
+ GNUNET_free (h->emsg);
GNUNET_asprintf (&h->emsg, _ ("Unable to flush buffer to file"));
return GNUNET_SYSERR;
}
@@ -698,7 +698,7 @@ GNUNET_BIO_get_buffer_contents (struct GNUNET_BIO_WriteHandle *h,
if (NULL != emsg)
*emsg = h->emsg;
else
- GNUNET_free_non_null (h->emsg);
+ GNUNET_free (h->emsg);
*contents = GNUNET_buffer_reap ((struct GNUNET_Buffer *) h->buffer, size);
return ret;
}
@@ -750,7 +750,7 @@ write_to_file (struct GNUNET_BIO_WriteHandle *h,
_ ("Error while writing `%s' to file: %s"),
what,
tmp);
- GNUNET_free_non_null (tmp);
+ GNUNET_free (tmp);
return GNUNET_SYSERR;
}
}
@@ -870,7 +870,7 @@ GNUNET_BIO_write_meta_data (struct GNUNET_BIO_WriteHandle *h,
if (-1 == size)
{
GNUNET_free (buf);
- GNUNET_free_non_null (h->emsg);
+ GNUNET_free (h->emsg);
GNUNET_asprintf (&h->emsg,
_ ("Failed to serialize metadata `%s'"),
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)
void
GNUNET_buffer_clear (struct GNUNET_Buffer *buf)
{
- GNUNET_free_non_null (buf->mem);
+ GNUNET_free (buf->mem);
memset (buf, 0, sizeof (struct GNUNET_Buffer));
}
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,
}
cancel_aps (cstate);
GNUNET_free (cstate->service_name);
- GNUNET_free_non_null (cstate->hostname);
+ GNUNET_free (cstate->hostname);
GNUNET_MST_destroy (cstate->mst);
GNUNET_free (cstate);
}
@@ -563,7 +563,7 @@ try_unixpath (const char *service_name,
if (NULL != sock)
GNUNET_NETWORK_socket_close (sock);
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
#endif
return NULL;
}
@@ -747,7 +747,7 @@ test_service_configuration (const char *service_name,
_ ("not a valid filename"));
return GNUNET_SYSERR; /* UNIXPATH specified but invalid! */
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
#endif
if ((GNUNET_YES ==
@@ -768,7 +768,7 @@ test_service_configuration (const char *service_name,
&hostname)) &&
(0 != strlen (hostname)))
ret = GNUNET_OK;
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return ret;
}
@@ -1043,7 +1043,7 @@ GNUNET_CLIENT_test (const struct GNUNET_CONFIGURATION_Handle *cfg,
/* service running remotely */
ret = GNUNET_OK;
}
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return ret;
}
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)
* want to keep track of allocations.
*
* @param ptr the pointer to free
- * @param filename where in the code was the call to GNUNET_free
- * @param linenumber where in the code was the call to GNUNET_free
+ * @param filename where in the code was the call to GNUNET_free()
+ * @param linenumber where in the code was the call to GNUNET_free()
*/
void
GNUNET_xfree_ (void *ptr, const char *filename, int linenumber)
{
- GNUNET_assert_at (NULL != ptr, filename, linenumber);
#ifdef W32_MEM_LIMIT
ptr = &((size_t *) ptr)[-1];
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,
#if ! defined(GNUNET_CULL_LOGGING)
parse_all_definitions ();
#endif
- GNUNET_free_non_null (component);
+ GNUNET_free (component);
GNUNET_asprintf (&component, "%s-%d", comp, getpid ());
- GNUNET_free_non_null (component_nopid);
+ GNUNET_free (component_nopid);
component_nopid = GNUNET_strdup (comp);
env_logfile = getenv ("GNUNET_FORCE_LOGFILE");
@@ -725,7 +725,7 @@ GNUNET_log_setup (const char *comp,
logfile = env_logfile;
if (NULL == logfile)
return GNUNET_OK;
- GNUNET_free_non_null (log_file_name);
+ GNUNET_free (log_file_name);
log_file_name = GNUNET_STRINGS_filename_expand (logfile);
if (NULL == log_file_name)
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,
line_orig = NULL;
while (r_bytes < size)
{
- GNUNET_free_non_null (line_orig);
+ GNUNET_free (line_orig);
/* fgets-like behaviour on buffer */
to_read = size - r_bytes;
pos = memchr (&mem[r_bytes], '\n', to_read);
@@ -404,7 +404,7 @@ GNUNET_CONFIGURATION_deserialize (struct GNUNET_CONFIGURATION_Handle *cfg,
ret = GNUNET_SYSERR;
break;
}
- GNUNET_free_non_null (line_orig);
+ GNUNET_free (line_orig);
GNUNET_free (section);
GNUNET_assert ((GNUNET_OK != ret) || (r_bytes == size));
return ret;
@@ -734,7 +734,7 @@ GNUNET_CONFIGURATION_remove_section (struct GNUNET_CONFIGURATION_Handle *cfg,
{
spos->entries = ent->next;
GNUNET_free (ent->key);
- GNUNET_free_non_null (ent->val);
+ GNUNET_free (ent->val);
GNUNET_free (ent);
cfg->dirty = GNUNET_YES;
}
@@ -926,13 +926,13 @@ GNUNET_CONFIGURATION_set_value_string (struct GNUNET_CONFIGURATION_Handle *cfg,
{
if (NULL == value)
{
- GNUNET_free_non_null (e->val);
+ GNUNET_free (e->val);
e->val = NULL;
}
else
{
nv = GNUNET_strdup (value);
- GNUNET_free_non_null (e->val);
+ GNUNET_free (e->val);
e->val = nv;
}
return;
@@ -1383,7 +1383,7 @@ expand_dollar (const struct GNUNET_CONFIGURATION_Handle *cfg,
result = GNUNET_malloc (strlen (prefix) + strlen (post) + 1);
strcpy (result, prefix);
strcat (result, post);
- GNUNET_free_non_null (def);
+ GNUNET_free (def);
GNUNET_free (prefix);
GNUNET_free (orig);
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)
return;
if (bf->fh != NULL)
GNUNET_DISK_file_close (bf->fh);
- GNUNET_free_non_null (bf->filename);
+ GNUNET_free (bf->filename);
GNUNET_free (bf->bitArray);
GNUNET_free (bf);
}
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 ()
static void
meta_item_free (struct MetaItem *mi)
{
- GNUNET_free_non_null (mi->plugin_name);
- GNUNET_free_non_null (mi->mime_type);
- GNUNET_free_non_null (mi->data);
+ GNUNET_free (mi->plugin_name);
+ GNUNET_free (mi->mime_type);
+ GNUNET_free (mi->data);
GNUNET_free (mi);
}
@@ -258,7 +258,7 @@ GNUNET_CONTAINER_meta_data_destroy (struct GNUNET_CONTAINER_MetaData *md)
GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, pos);
meta_item_free (pos);
}
- GNUNET_free_non_null (md->sbuf);
+ GNUNET_free (md->sbuf);
GNUNET_free (md);
}
@@ -280,7 +280,7 @@ GNUNET_CONTAINER_meta_data_clear (struct GNUNET_CONTAINER_MetaData *md)
GNUNET_CONTAINER_DLL_remove (md->items_head, md->items_tail, mi);
meta_item_free (mi);
}
- GNUNET_free_non_null (md->sbuf);
+ GNUNET_free (md->sbuf);
memset (md, 0, sizeof(struct GNUNET_CONTAINER_MetaData));
}
@@ -976,7 +976,7 @@ GNUNET_CONTAINER_meta_data_serialize (const struct GNUNET_CONTAINER_MetaData
if (NULL != pos->mime_type)
left -= strlen (pos->mime_type) + 1;
- GNUNET_free_non_null (cdata);
+ GNUNET_free (cdata);
cdata = NULL;
i++;
@@ -1180,7 +1180,7 @@ GNUNET_CONTAINER_meta_data_deserialize (const char *input, size_t size)
ntohl (ent.type), format, mime_type,
meta_data, dlen);
}
- GNUNET_free_non_null (data);
+ GNUNET_free (data);
return md;
}
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])
GNUNET_break (0 == close (p->fd[0]->fd));
if (p->fd[1]->fd >= 0)
GNUNET_break (0 == close (p->fd[1]->fd));
- GNUNET_free_non_null (p->fd[0]);
- GNUNET_free_non_null (p->fd[1]);
+ GNUNET_free (p->fd[0]);
+ GNUNET_free (p->fd[1]);
GNUNET_free (p);
errno = eno;
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)
{
if (NULL == soa)
return;
- GNUNET_free_non_null (soa->mname);
- GNUNET_free_non_null (soa->rname);
+ GNUNET_free (soa->mname);
+ GNUNET_free (soa->rname);
GNUNET_free (soa);
}
@@ -125,7 +125,7 @@ GNUNET_DNSPARSER_free_cert (struct GNUNET_DNSPARSER_CertRecord *cert)
{
if (NULL == cert)
return;
- GNUNET_free_non_null (cert->certificate_data);
+ GNUNET_free (cert->certificate_data);
GNUNET_free (cert);
}
@@ -140,7 +140,7 @@ GNUNET_DNSPARSER_free_srv (struct GNUNET_DNSPARSER_SrvRecord *srv)
{
if (NULL == srv)
return;
- GNUNET_free_non_null (srv->target);
+ GNUNET_free (srv->target);
GNUNET_free (srv);
}
@@ -155,7 +155,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx)
{
if (NULL == mx)
return;
- GNUNET_free_non_null (mx->mxhost);
+ GNUNET_free (mx->mxhost);
GNUNET_free (mx);
}
@@ -168,7 +168,7 @@ GNUNET_DNSPARSER_free_mx (struct GNUNET_DNSPARSER_MxRecord *mx)
void
GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r)
{
- GNUNET_free_non_null (r->name);
+ GNUNET_free (r->name);
switch (r->type)
{
case GNUNET_DNSPARSER_TYPE_MX:
@@ -190,11 +190,11 @@ GNUNET_DNSPARSER_free_record (struct GNUNET_DNSPARSER_Record *r)
case GNUNET_DNSPARSER_TYPE_NS:
case GNUNET_DNSPARSER_TYPE_CNAME:
case GNUNET_DNSPARSER_TYPE_PTR:
- GNUNET_free_non_null (r->data.hostname);
+ GNUNET_free (r->data.hostname);
break;
default:
- GNUNET_free_non_null (r->data.raw.data);
+ GNUNET_free (r->data.raw.data);
break;
}
}
@@ -854,17 +854,17 @@ void
GNUNET_DNSPARSER_free_packet (struct GNUNET_DNSPARSER_Packet *p)
{
for (unsigned int i = 0; i < p->num_queries; i++)
- GNUNET_free_non_null (p->queries[i].name);
- GNUNET_free_non_null (p->queries);
+ GNUNET_free (p->queries[i].name);
+ GNUNET_free (p->queries);
for (unsigned int i = 0; i < p->num_answers; i++)
GNUNET_DNSPARSER_free_record (&p->answers[i]);
- GNUNET_free_non_null (p->answers);
+ GNUNET_free (p->answers);
for (unsigned int i = 0; i < p->num_authority_records; i++)
GNUNET_DNSPARSER_free_record (&p->authority_records[i]);
- GNUNET_free_non_null (p->authority_records);
+ GNUNET_free (p->authority_records);
for (unsigned int i = 0; i < p->num_additional_records; i++)
GNUNET_DNSPARSER_free_record (&p->additional_records[i]);
- GNUNET_free_non_null (p->additional_records);
+ GNUNET_free (p->additional_records);
GNUNET_free (p);
}
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,
(void) ctx;
(void) option;
GNUNET_assert (NULL != value);
- GNUNET_free_non_null (*val);
+ GNUNET_free (*val);
*val = GNUNET_strdup (value);
return GNUNET_OK;
}
@@ -458,7 +458,7 @@ set_filename (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
(void) ctx;
(void) option;
GNUNET_assert (NULL != value);
- GNUNET_free_non_null (*val);
+ GNUNET_free (*val);
*val = GNUNET_STRINGS_filename_expand (value);
return GNUNET_OK;
}
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,
GNUNET_CONFIGURATION_write ((NULL == out) ? diff : out, cfgfile))
global_ret = 2;
}
- GNUNET_free_non_null (cfg_fn);
+ GNUNET_free (cfg_fn);
if (NULL != out)
GNUNET_CONFIGURATION_destroy (out);
cleanup:
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)
? 0
: 1;
GNUNET_free_nz ((void *) argv);
- GNUNET_free_non_null (pwfn);
+ GNUNET_free (pwfn);
return ret;
}
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)
GNUNET_free (pos->record);
GNUNET_free (pos);
}
- GNUNET_free_non_null (rc->hostname);
+ GNUNET_free (rc->hostname);
GNUNET_CONTAINER_DLL_remove (cache_head, cache_tail, rc);
cache_size--;
GNUNET_free (rc);
@@ -241,7 +241,7 @@ free_hosts_entry (struct ResolveCache *rc)
GNUNET_free (pos->record);
GNUNET_free (pos);
}
- GNUNET_free_non_null (rc->hostname);
+ GNUNET_free (rc->hostname);
GNUNET_CONTAINER_DLL_remove (hosts_head, hosts_tail, rc);
cache_size--;
GNUNET_free (rc);
@@ -267,7 +267,7 @@ free_active_lookup (struct ActiveLookup *al)
GNUNET_SCHEDULER_cancel (al->timeout_task);
al->timeout_task = NULL;
}
- GNUNET_free_non_null (al->hostname);
+ GNUNET_free (al->hostname);
GNUNET_free (al);
}
@@ -1094,7 +1094,7 @@ handle_get (void *cls, const struct GNUNET_RESOLVER_GetMessage *msg)
client_request_id,
client);
}
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
}
@@ -1115,7 +1115,7 @@ shutdown_task (void *cls)
while (NULL != hosts_head)
free_hosts_entry (hosts_head);
GNUNET_DNSSTUB_stop (dnsstub_ctx);
- GNUNET_free_non_null (my_domain);
+ GNUNET_free (my_domain);
}
@@ -1296,7 +1296,7 @@ init_cb (void *cls,
GNUNET_OK == result ? "success" : "failure");
GNUNET_free (dns_servers[i]);
}
- GNUNET_free_non_null (dns_servers);
+ GNUNET_free (dns_servers);
}
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)
GNUNET_CONTAINER_multihashmap32_destroy (mq->assoc_map);
mq->assoc_map = NULL;
}
- GNUNET_free_non_null (mq->handlers);
+ GNUNET_free (mq->handlers);
GNUNET_free (mq);
}
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)
void
GNUNET_NETWORK_socket_free_memory_only_ (struct GNUNET_NETWORK_Handle *desc)
{
- GNUNET_free_non_null (desc->addr);
+ GNUNET_free (desc->addr);
GNUNET_free (desc);
}
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)
(GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES)))
{
GNUNET_free (execpath);
- GNUNET_free_non_null (dirname);
+ GNUNET_free (dirname);
return tmp;
}
GNUNET_free (tmp);
- GNUNET_free_non_null (dirname);
+ GNUNET_free (dirname);
}
GNUNET_asprintf (&dirname,
DIR_SEPARATOR_STR "%s" DIR_SEPARATOR_STR,
@@ -643,11 +643,11 @@ GNUNET_OS_installation_get_path (enum GNUNET_OS_InstallationPathKind dirkind)
(GNUNET_YES == GNUNET_DISK_directory_test (tmp, GNUNET_YES)))
{
GNUNET_free (execpath);
- GNUNET_free_non_null (dirname);
+ GNUNET_free (dirname);
return tmp;
}
GNUNET_free (tmp);
- GNUNET_free_non_null (dirname);
+ GNUNET_free (dirname);
}
GNUNET_asprintf (&dirname,
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,
ret = GNUNET_OK;
cleanup:
GNUNET_CONFIGURATION_destroy (cfg);
- GNUNET_free_non_null (cc.cfgfile);
- GNUNET_free_non_null (cfg_fn);
- GNUNET_free_non_null (loglev);
- GNUNET_free_non_null (logfile);
+ GNUNET_free (cc.cfgfile);
+ GNUNET_free (cfg_fn);
+ GNUNET_free (loglev);
+ GNUNET_free (logfile);
return ret;
}
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,
GNUNET_asprintf (&ret,
"%s%s%s%s",
a, b, c, d);
- GNUNET_free_non_null (a);
- GNUNET_free_non_null (b);
- GNUNET_free_non_null (c);
- GNUNET_free_non_null (d);
+ GNUNET_free (a);
+ GNUNET_free (b);
+ GNUNET_free (c);
+ GNUNET_free (d);
return ret;
}
@@ -607,7 +607,7 @@ address_to_regex (const void *addr,
reg = num_to_regex (a[i], m[i]);
if (NULL == reg)
{
- GNUNET_free_non_null (ret);
+ GNUNET_free (ret);
return NULL;
}
if (NULL == ret)
@@ -721,7 +721,7 @@ GNUNET_TUN_ipv4policy2regex (const char *policy)
line = ipv4_to_regex (&np[i]);
if (NULL == line)
{
- GNUNET_free_non_null (reg);
+ GNUNET_free (reg);
GNUNET_free (np);
return NULL;
}
@@ -777,7 +777,7 @@ GNUNET_TUN_ipv6policy2regex (const char *policy)
line = ipv6_to_regex (&np[i]);
if (NULL == line)
{
- GNUNET_free_non_null (reg);
+ GNUNET_free (reg);
GNUNET_free (np);
return NULL;
}
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,
(EACCES == errno))
{
LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
@@ -1170,7 +1170,7 @@ get_server_addresses (const char *service_name,
_ (
"Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
service_name);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (hostname);
return GNUNET_SYSERR;
}
if (0 == port)
@@ -1178,8 +1178,8 @@ get_server_addresses (const char *service_name,
saddrs = GNUNET_new_array (2, struct sockaddr *);
saddrlens = GNUNET_new_array (2, socklen_t);
add_unixpath (saddrs, saddrlens, unixpath);
- GNUNET_free_non_null (unixpath);
- GNUNET_free_non_null (hostname);
+ GNUNET_free (unixpath);
+ GNUNET_free (hostname);
*addrs = saddrs;
*addr_lens = saddrlens;
return 1;
@@ -1203,7 +1203,7 @@ get_server_addresses (const char *service_name,
hostname,
gai_strerror (ret));
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
next = res;
@@ -1223,7 +1223,7 @@ get_server_addresses (const char *service_name,
hostname);
freeaddrinfo (res);
GNUNET_free (hostname);
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
return GNUNET_SYSERR;
}
resi = i;
@@ -1330,7 +1330,7 @@ get_server_addresses (const char *service_name,
((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
}
}
- GNUNET_free_non_null (unixpath);
+ GNUNET_free (unixpath);
*addrs = saddrs;
*addr_lens = saddrlens;
return resi;
@@ -1557,8 +1557,8 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
}
GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc);
}
- GNUNET_free_non_null (addrlens);
- GNUNET_free_non_null (addrs);
+ GNUNET_free (addrlens);
+ GNUNET_free (addrs);
if ((0 != num) && (NULL == sh->slc_head))
{
/* All attempts to bind failed, hard failure */
@@ -1566,7 +1566,7 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
GNUNET_ERROR_TYPE_ERROR,
_ (
"Could not bind to any of the ports I was supposed to, refusing to run!\n"));
- GNUNET_free_non_null (csocks);
+ GNUNET_free (csocks);
return GNUNET_SYSERR;
}
}
@@ -1793,10 +1793,10 @@ teardown_service (struct GNUNET_SERVICE_Handle *sh)
{
struct ServiceListenContext *slc;
- GNUNET_free_non_null (sh->v4_denied);
- GNUNET_free_non_null (sh->v6_denied);
- GNUNET_free_non_null (sh->v4_allowed);
- GNUNET_free_non_null (sh->v6_allowed);
+ GNUNET_free (sh->v4_denied);
+ GNUNET_free (sh->v6_denied);
+ GNUNET_free (sh->v4_allowed);
+ GNUNET_free (sh->v6_allowed);
while (NULL != (slc = sh->slc_head))
{
GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc);
@@ -1890,7 +1890,7 @@ GNUNET_SERVICE_start (const char *service_name,
sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL);
if (GNUNET_OK != setup_service (sh))
{
- GNUNET_free_non_null (sh->handlers);
+ GNUNET_free (sh->handlers);
GNUNET_free (sh);
return NULL;
}
@@ -1913,7 +1913,7 @@ GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Handle *srv)
while (NULL != (client = srv->clients_head))
GNUNET_SERVICE_client_drop (client);
teardown_service (srv);
- GNUNET_free_non_null (srv->handlers);
+ GNUNET_free (srv->handlers);
GNUNET_free (srv);
}
@@ -2159,13 +2159,13 @@ shutdown:
}
#endif
teardown_service (&sh);
- GNUNET_free_non_null (sh.handlers);
+ GNUNET_free (sh.handlers);
GNUNET_SPEEDUP_stop_ ();
GNUNET_CONFIGURATION_destroy (cfg);
- GNUNET_free_non_null (logfile);
- GNUNET_free_non_null (loglev);
+ GNUNET_free (logfile);
+ GNUNET_free (loglev);
GNUNET_free (cfg_filename);
- GNUNET_free_non_null (opt_cfg_filename);
+ GNUNET_free (opt_cfg_filename);
return err ? GNUNET_SYSERR : sh.ret;
}
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,
(host0 != NULL) ? host0
: "127.0.0.1",
port0);
- GNUNET_free_non_null (host0);
+ GNUNET_free (host0);
/* Sets to NULL if they do not exist */
(void) GNUNET_CONFIGURATION_get_value_string (cfg,
@@ -677,8 +677,8 @@ GNUNET_SOCKS_do_connect (const char *service_name,
"SOCKSPASS",
&pass);
ih = GNUNET_SOCKS_init_handshake (user, pass);
- GNUNET_free_non_null (user);
- GNUNET_free_non_null (pass);
+ GNUNET_free (user);
+ GNUNET_free (pass);
GNUNET_SOCKS_set_handshake_destination (ih, host1, port1);
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,
if (r_uri_scheme)
*r_uri_scheme = uri;
else
- GNUNET_free_non_null (uri);
+ GNUNET_free (uri);
return GNUNET_STRINGS_path_is_absolute (post_scheme_path,
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)
GNUNET_free (ptrs[i]);
}
- /* GNUNET_free_non_null test */
- GNUNET_free_non_null (NULL);
- GNUNET_free_non_null (GNUNET_malloc (4));
+ /* GNUNET_free test */
+ GNUNET_free (NULL);
+ GNUNET_free (GNUNET_malloc (4));
/* GNUNET_strdup tests */
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,
}
else
cbData->status = 1;
- GNUNET_free_non_null (diffValue);
+ GNUNET_free (diffValue);
break;
}
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)
GNUNET_CONTAINER_meta_data_serialize (m, &sval, size,
GNUNET_CONTAINER_META_DATA_SERIALIZE_FULL))
{
- GNUNET_free_non_null (sval);
+ GNUNET_free (sval);
ABORT (m);
}
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 ()
ret = 1;
}
error:
- GNUNET_free_non_null (res);
+ GNUNET_free (res);
return ret;
}
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,
own_fqdn = GNUNET_RESOLVER_local_fqdn_get ();
/* can't really check, only thing we can safely
compare against is our own identical logic... */
- GNUNET_free_non_null (own_fqdn);
+ GNUNET_free (own_fqdn);
/*
* 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)
stats = NULL;
}
for (i = 0; i < 5; i++)
- GNUNET_free_non_null (vpn_argv[i]);
+ GNUNET_free (vpn_argv[i]);
}
@@ -3008,7 +3008,7 @@ run (void *cls,
_ ("Must specify valid IPv6 address"));
GNUNET_free (binary);
GNUNET_SCHEDULER_shutdown ();
- GNUNET_free_non_null (ipv6addr);
+ GNUNET_free (ipv6addr);
return;
}
vpn_argv[2] = ipv6addr;
@@ -3020,7 +3020,7 @@ run (void *cls,
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, "VPN", "IPV6PREFIX");
GNUNET_SCHEDULER_shutdown ();
- GNUNET_free_non_null (ipv6prefix_s);
+ GNUNET_free (ipv6prefix_s);
return;
}
vpn_argv[3] = ipv6prefix_s;
@@ -3062,7 +3062,7 @@ run (void *cls,
_ ("Must specify valid IPv4 address"));
GNUNET_free (binary);
GNUNET_SCHEDULER_shutdown ();
- GNUNET_free_non_null (ipv4addr);
+ GNUNET_free (ipv4addr);
return;
}
vpn_argv[4] = ipv4addr;
@@ -3079,7 +3079,7 @@ run (void *cls,
_ ("Must specify valid IPv4 mask"));
GNUNET_free (binary);
GNUNET_SCHEDULER_shutdown ();
- GNUNET_free_non_null (ipv4mask);
+ GNUNET_free (ipv4mask);
return;
}
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)
GNUNET_VPN_disconnect (handle);
handle = NULL;
}
- GNUNET_free_non_null (peer_id);
- GNUNET_free_non_null (service_name);
- GNUNET_free_non_null (target_ip);
+ GNUNET_free (peer_id);
+ GNUNET_free (service_name);
+ GNUNET_free (target_ip);
}