summaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:34 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-05 16:32:34 +0200
commite31c1d4a9f78c4e31fda1f98fe349b33abdd01a2 (patch)
tree61df772a93f7f21af7c715ddd4b9a3f1a50e0509 /src/transport
parent1437556645417e6302862845e7ebcbd4c9908357 (diff)
GNUNET_free_non_null -> GNUNET_free
Diffstat (limited to 'src/transport')
-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
17 files changed, 96 insertions, 96 deletions
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);
}