aboutsummaryrefslogtreecommitdiff
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)
downloadgnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.tar.gz
gnunet-e31c1d4a9f78c4e31fda1f98fe349b33abdd01a2.zip
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)
783 GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi); 783 GNUNET_CONTAINER_DLL_remove (bi_head, bi_tail, bi);
784 GNUNET_SCHEDULER_cancel (bi->broadcast_task); 784 GNUNET_SCHEDULER_cancel (bi->broadcast_task);
785 GNUNET_free (bi->sa); 785 GNUNET_free (bi->sa);
786 GNUNET_free_non_null (bi->ba); 786 GNUNET_free (bi->ba);
787 GNUNET_free (bi); 787 GNUNET_free (bi);
788} 788}
789 789
diff --git a/src/transport/gnunet-service-transport.c b/src/transport/gnunet-service-transport.c
index 93fa031f4..9bdcd64be 100644
--- a/src/transport/gnunet-service-transport.c
+++ b/src/transport/gnunet-service-transport.c
@@ -2108,7 +2108,7 @@ free_blacklist_entry (void *cls,
2108{ 2108{
2109 char *be = value; 2109 char *be = value;
2110 2110
2111 GNUNET_free_non_null (be); 2111 GNUNET_free (be);
2112 return GNUNET_OK; 2112 return GNUNET_OK;
2113} 2113}
2114 2114
@@ -2511,7 +2511,7 @@ GST_blacklist_test_cancel (struct GST_BlacklistCheck *bc)
2511 GNUNET_SCHEDULER_cancel (bc->task); 2511 GNUNET_SCHEDULER_cancel (bc->task);
2512 bc->task = NULL; 2512 bc->task = NULL;
2513 } 2513 }
2514 GNUNET_free_non_null (bc->address); 2514 GNUNET_free (bc->address);
2515 GNUNET_free (bc); 2515 GNUNET_free (bc);
2516} 2516}
2517 2517
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index ed6565d23..472c77c27 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -182,7 +182,7 @@ refresh_hello_task (void *cls)
182 gc.addr_pos = oal_head; 182 gc.addr_pos = oal_head;
183 gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration); 183 gc.expiration = GNUNET_TIME_relative_to_absolute (hello_expiration);
184 184
185 GNUNET_free_non_null (our_hello); 185 GNUNET_free (our_hello);
186 our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key, 186 our_hello = GNUNET_HELLO_create (&GST_my_identity.public_key,
187 &address_generator, 187 &address_generator,
188 &gc, 188 &gc,
diff --git a/src/transport/gnunet-transport.c b/src/transport/gnunet-transport.c
index 35da5ec10..0d71e1ff9 100644
--- a/src/transport/gnunet-transport.c
+++ b/src/transport/gnunet-transport.c
@@ -339,7 +339,7 @@ destroy_it (void *cls, const struct GNUNET_PeerIdentity *key, void *value)
339 GNUNET_assert ( 339 GNUNET_assert (
340 GNUNET_OK == 340 GNUNET_OK ==
341 GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value)); 341 GNUNET_CONTAINER_multipeermap_remove (monitored_peers, key, value));
342 GNUNET_free_non_null (m->address); 342 GNUNET_free (m->address);
343 GNUNET_free (value); 343 GNUNET_free (value);
344 return GNUNET_OK; 344 return GNUNET_OK;
345} 345}
@@ -1037,7 +1037,7 @@ plugin_monitoring_cb (void *cls,
1037 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); 1037 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
1038 addr->asc = NULL; 1038 addr->asc = NULL;
1039 } 1039 }
1040 GNUNET_free_non_null (addr->str); 1040 GNUNET_free (addr->str);
1041 GNUNET_free (addr); 1041 GNUNET_free (addr);
1042 *session_ctx = NULL; 1042 *session_ctx = NULL;
1043 } 1043 }
@@ -1069,7 +1069,7 @@ plugin_monitoring_cb (void *cls,
1069 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc); 1069 GNUNET_TRANSPORT_address_to_string_cancel (addr->asc);
1070 addr->asc = NULL; 1070 addr->asc = NULL;
1071 } 1071 }
1072 GNUNET_free_non_null (addr->str); 1072 GNUNET_free (addr->str);
1073 GNUNET_free (addr); 1073 GNUNET_free (addr);
1074 *session_ctx = NULL; 1074 *session_ctx = NULL;
1075 } 1075 }
diff --git a/src/transport/plugin_transport_http_client.c b/src/transport/plugin_transport_http_client.c
index 87cd7ead2..92ed2fe52 100644
--- a/src/transport/plugin_transport_http_client.c
+++ b/src/transport/plugin_transport_http_client.c
@@ -2207,9 +2207,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
2207 _ ("Shutdown for plugin `%s' complete\n"), 2207 _ ("Shutdown for plugin `%s' complete\n"),
2208 plugin->name); 2208 plugin->name);
2209 GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions); 2209 GNUNET_CONTAINER_multipeermap_destroy (plugin->sessions);
2210 GNUNET_free_non_null (plugin->proxy_hostname); 2210 GNUNET_free (plugin->proxy_hostname);
2211 GNUNET_free_non_null (plugin->proxy_username); 2211 GNUNET_free (plugin->proxy_username);
2212 GNUNET_free_non_null (plugin->proxy_password); 2212 GNUNET_free (plugin->proxy_password);
2213 GNUNET_free (plugin); 2213 GNUNET_free (plugin);
2214 GNUNET_free (api); 2214 GNUNET_free (api);
2215 return NULL; 2215 return NULL;
@@ -2304,9 +2304,9 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
2304 GNUNET_free (proxy_type); 2304 GNUNET_free (proxy_type);
2305 GNUNET_free (plugin->proxy_hostname); 2305 GNUNET_free (plugin->proxy_hostname);
2306 plugin->proxy_hostname = NULL; 2306 plugin->proxy_hostname = NULL;
2307 GNUNET_free_non_null (plugin->proxy_username); 2307 GNUNET_free (plugin->proxy_username);
2308 plugin->proxy_username = NULL; 2308 plugin->proxy_username = NULL;
2309 GNUNET_free_non_null (plugin->proxy_password); 2309 GNUNET_free (plugin->proxy_password);
2310 plugin->proxy_password = NULL; 2310 plugin->proxy_password = NULL;
2311 2311
2312 return GNUNET_SYSERR; 2312 return GNUNET_SYSERR;
@@ -2325,7 +2325,7 @@ client_configure_plugin (struct HTTP_Client_Plugin *plugin)
2325 if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel) 2325 if (GNUNET_SYSERR == plugin->proxy_use_httpproxytunnel)
2326 plugin->proxy_use_httpproxytunnel = GNUNET_NO; 2326 plugin->proxy_use_httpproxytunnel = GNUNET_NO;
2327 2327
2328 GNUNET_free_non_null (proxy_type); 2328 GNUNET_free (proxy_type);
2329 } 2329 }
2330 2330
2331 /* Should we emulate an XHR client for testing? */ 2331 /* Should we emulate an XHR client for testing? */
diff --git a/src/transport/plugin_transport_http_common.c b/src/transport/plugin_transport_http_common.c
index 2bcab42b4..d81d6db9c 100644
--- a/src/transport/plugin_transport_http_common.c
+++ b/src/transport/plugin_transport_http_common.c
@@ -34,10 +34,10 @@ http_clean_splitted (struct SplittedHTTPAddress *spa)
34{ 34{
35 if (NULL != spa) 35 if (NULL != spa)
36 { 36 {
37 GNUNET_free_non_null (spa->protocol); 37 GNUNET_free (spa->protocol);
38 GNUNET_free_non_null (spa->host); 38 GNUNET_free (spa->host);
39 GNUNET_free_non_null (spa->path); 39 GNUNET_free (spa->path);
40 GNUNET_free_non_null (spa); 40 GNUNET_free (spa);
41 } 41 }
42} 42}
43 43
@@ -494,7 +494,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
494 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); 494 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
495 asc (asc_cls, NULL, GNUNET_OK); 495 asc (asc_cls, NULL, GNUNET_OK);
496 http_clean_splitted (saddr); 496 http_clean_splitted (saddr);
497 GNUNET_free_non_null (sock_addr); 497 GNUNET_free (sock_addr);
498 return; 498 return;
499 } 499 }
500 if ((GNUNET_YES == numeric) && 500 if ((GNUNET_YES == numeric) &&
@@ -510,7 +510,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
510 goto handle_error; 510 goto handle_error;
511 } 511 }
512 /* Wait for resolver callback */ 512 /* Wait for resolver callback */
513 GNUNET_free_non_null (sock_addr); 513 GNUNET_free (sock_addr);
514 return; 514 return;
515 } 515 }
516 if ((GNUNET_NO == numeric) && 516 if ((GNUNET_NO == numeric) &&
@@ -531,7 +531,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
531 goto handle_error; 531 goto handle_error;
532 } 532 }
533 /* Wait for resolver callback */ 533 /* Wait for resolver callback */
534 GNUNET_free_non_null (sock_addr); 534 GNUNET_free (sock_addr);
535 return; 535 return;
536 } 536 }
537 if ((GNUNET_NO == numeric) && 537 if ((GNUNET_NO == numeric) &&
@@ -541,7 +541,7 @@ http_common_plugin_address_pretty_printer (void *cls, const char *type,
541 ret = http_common_plugin_address_to_string (type, address, addrlen); 541 ret = http_common_plugin_address_to_string (type, address, addrlen);
542 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK); 542 asc (asc_cls, ret, (NULL == ret) ? GNUNET_SYSERR : GNUNET_OK);
543 asc (asc_cls, NULL, GNUNET_OK); 543 asc (asc_cls, NULL, GNUNET_OK);
544 GNUNET_free_non_null (sock_addr); 544 GNUNET_free (sock_addr);
545 http_clean_splitted (saddr); 545 http_clean_splitted (saddr);
546 return; 546 return;
547 } 547 }
@@ -553,7 +553,7 @@ handle_error:
553 /* Report error */ 553 /* Report error */
554 asc (asc_cls, NULL, GNUNET_SYSERR); 554 asc (asc_cls, NULL, GNUNET_SYSERR);
555 asc (asc_cls, NULL, GNUNET_OK); 555 asc (asc_cls, NULL, GNUNET_OK);
556 GNUNET_free_non_null (sock_addr); 556 GNUNET_free (sock_addr);
557 if (NULL != saddr) 557 if (NULL != saddr)
558 http_clean_splitted (saddr); 558 http_clean_splitted (saddr);
559} 559}
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index eef83b29d..514f7fd1f 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1495,7 +1495,7 @@ server_lookup_connection (struct HTTP_Server_Plugin *plugin,
1495 http_common_plugin_address_to_string (plugin->protocol, 1495 http_common_plugin_address_to_string (plugin->protocol,
1496 addr, 1496 addr,
1497 addr_len)); 1497 addr_len));
1498 GNUNET_free_non_null (addr); 1498 GNUNET_free (addr);
1499 } 1499 }
1500 1500
1501 if ((_RECEIVE == direction) && 1501 if ((_RECEIVE == direction) &&
@@ -2179,9 +2179,9 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
2179 { 2179 {
2180 struct GNUNET_OS_Process *cert_creation; 2180 struct GNUNET_OS_Process *cert_creation;
2181 2181
2182 GNUNET_free_non_null (plugin->key); 2182 GNUNET_free (plugin->key);
2183 plugin->key = NULL; 2183 plugin->key = NULL;
2184 GNUNET_free_non_null (plugin->cert); 2184 GNUNET_free (plugin->cert);
2185 plugin->cert = NULL; 2185 plugin->cert = NULL;
2186 2186
2187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 2187 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -2203,11 +2203,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
2203 GNUNET_free (key_file); 2203 GNUNET_free (key_file);
2204 GNUNET_free (cert_file); 2204 GNUNET_free (cert_file);
2205 2205
2206 GNUNET_free_non_null (plugin->key); 2206 GNUNET_free (plugin->key);
2207 plugin->key = NULL; 2207 plugin->key = NULL;
2208 GNUNET_free_non_null (plugin->cert); 2208 GNUNET_free (plugin->cert);
2209 plugin->cert = NULL; 2209 plugin->cert = NULL;
2210 GNUNET_free_non_null (plugin->crypto_init); 2210 GNUNET_free (plugin->crypto_init);
2211 plugin->crypto_init = NULL; 2211 plugin->crypto_init = NULL;
2212 2212
2213 return GNUNET_SYSERR; 2213 return GNUNET_SYSERR;
@@ -2228,11 +2228,11 @@ server_load_certificate (struct HTTP_Server_Plugin *plugin)
2228 GNUNET_free (key_file); 2228 GNUNET_free (key_file);
2229 GNUNET_free (cert_file); 2229 GNUNET_free (cert_file);
2230 2230
2231 GNUNET_free_non_null (plugin->key); 2231 GNUNET_free (plugin->key);
2232 plugin->key = NULL; 2232 plugin->key = NULL;
2233 GNUNET_free_non_null (plugin->cert); 2233 GNUNET_free (plugin->cert);
2234 plugin->cert = NULL; 2234 plugin->cert = NULL;
2235 GNUNET_free_non_null (plugin->crypto_init); 2235 GNUNET_free (plugin->crypto_init);
2236 plugin->crypto_init = NULL; 2236 plugin->crypto_init = NULL;
2237 2237
2238 return GNUNET_SYSERR; 2238 return GNUNET_SYSERR;
@@ -2871,8 +2871,8 @@ server_start_report_addresses (struct HTTP_Server_Plugin *plugin)
2871 GNUNET_assert (NULL != addrs[res]); 2871 GNUNET_assert (NULL != addrs[res]);
2872 GNUNET_free (addrs[res]); 2872 GNUNET_free (addrs[res]);
2873 } 2873 }
2874 GNUNET_free_non_null (addrs); 2874 GNUNET_free (addrs);
2875 GNUNET_free_non_null (addrlens); 2875 GNUNET_free (addrlens);
2876} 2876}
2877 2877
2878 2878
@@ -3316,9 +3316,9 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
3316 plugin->server_v6_task = NULL; 3316 plugin->server_v6_task = NULL;
3317 } 3317 }
3318#if BUILD_HTTPS 3318#if BUILD_HTTPS
3319 GNUNET_free_non_null (plugin->crypto_init); 3319 GNUNET_free (plugin->crypto_init);
3320 GNUNET_free_non_null (plugin->cert); 3320 GNUNET_free (plugin->cert);
3321 GNUNET_free_non_null (plugin->key); 3321 GNUNET_free (plugin->key);
3322#endif 3322#endif
3323 GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions, 3323 GNUNET_CONTAINER_multipeermap_iterate (plugin->sessions,
3324 &destroy_session_shutdown_cb, 3324 &destroy_session_shutdown_cb,
@@ -3336,10 +3336,10 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
3336 plugin->server_v6 = NULL; 3336 plugin->server_v6 = NULL;
3337 } 3337 }
3338 /* Clean up */ 3338 /* Clean up */
3339 GNUNET_free_non_null (plugin->external_hostname); 3339 GNUNET_free (plugin->external_hostname);
3340 GNUNET_free_non_null (plugin->ext_addr); 3340 GNUNET_free (plugin->ext_addr);
3341 GNUNET_free_non_null (plugin->server_addr_v4); 3341 GNUNET_free (plugin->server_addr_v4);
3342 GNUNET_free_non_null (plugin->server_addr_v6); 3342 GNUNET_free (plugin->server_addr_v6);
3343 regfree (&plugin->url_regex); 3343 regfree (&plugin->url_regex);
3344 3344
3345 LOG (GNUNET_ERROR_TYPE_DEBUG, 3345 LOG (GNUNET_ERROR_TYPE_DEBUG,
diff --git a/src/transport/plugin_transport_tcp.c b/src/transport/plugin_transport_tcp.c
index 4cec181b0..e3bc21543 100644
--- a/src/transport/plugin_transport_tcp.c
+++ b/src/transport/plugin_transport_tcp.c
@@ -1186,7 +1186,7 @@ get_server_addresses (const char *service_name,
1186 (EACCES == errno)) 1186 (EACCES == errno))
1187 { 1187 {
1188 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket"); 1188 GNUNET_log_strerror (GNUNET_ERROR_TYPE_ERROR, "socket");
1189 GNUNET_free_non_null (hostname); 1189 GNUNET_free (hostname);
1190 GNUNET_free (unixpath); 1190 GNUNET_free (unixpath);
1191 return GNUNET_SYSERR; 1191 return GNUNET_SYSERR;
1192 } 1192 }
@@ -1212,7 +1212,7 @@ get_server_addresses (const char *service_name,
1212 _ ( 1212 _ (
1213 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 1213 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
1214 service_name); 1214 service_name);
1215 GNUNET_free_non_null (hostname); 1215 GNUNET_free (hostname);
1216 return GNUNET_SYSERR; 1216 return GNUNET_SYSERR;
1217 } 1217 }
1218 if (0 == port) 1218 if (0 == port)
@@ -1220,8 +1220,8 @@ get_server_addresses (const char *service_name,
1220 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); 1220 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
1221 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); 1221 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
1222 add_unixpath (saddrs, saddrlens, unixpath, abstract); 1222 add_unixpath (saddrs, saddrlens, unixpath, abstract);
1223 GNUNET_free_non_null (unixpath); 1223 GNUNET_free (unixpath);
1224 GNUNET_free_non_null (hostname); 1224 GNUNET_free (hostname);
1225 *addrs = saddrs; 1225 *addrs = saddrs;
1226 *addr_lens = saddrlens; 1226 *addr_lens = saddrlens;
1227 return 1; 1227 return 1;
@@ -1245,7 +1245,7 @@ get_server_addresses (const char *service_name,
1245 hostname, 1245 hostname,
1246 gai_strerror (ret)); 1246 gai_strerror (ret));
1247 GNUNET_free (hostname); 1247 GNUNET_free (hostname);
1248 GNUNET_free_non_null (unixpath); 1248 GNUNET_free (unixpath);
1249 return GNUNET_SYSERR; 1249 return GNUNET_SYSERR;
1250 } 1250 }
1251 next = res; 1251 next = res;
@@ -1265,7 +1265,7 @@ get_server_addresses (const char *service_name,
1265 hostname); 1265 hostname);
1266 freeaddrinfo (res); 1266 freeaddrinfo (res);
1267 GNUNET_free (hostname); 1267 GNUNET_free (hostname);
1268 GNUNET_free_non_null (unixpath); 1268 GNUNET_free (unixpath);
1269 return GNUNET_SYSERR; 1269 return GNUNET_SYSERR;
1270 } 1270 }
1271 resi = i; 1271 resi = i;
@@ -1372,7 +1372,7 @@ get_server_addresses (const char *service_name,
1372 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 1372 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
1373 } 1373 }
1374 } 1374 }
1375 GNUNET_free_non_null (unixpath); 1375 GNUNET_free (unixpath);
1376 *addrs = saddrs; 1376 *addrs = saddrs;
1377 *addr_lens = saddrlens; 1377 *addr_lens = saddrlens;
1378 return resi; 1378 return resi;
@@ -3163,7 +3163,7 @@ handle_tcp_welcome (void *cls,
3163 else 3163 else
3164 { 3164 {
3165 GNUNET_break (0); 3165 GNUNET_break (0);
3166 GNUNET_free_non_null (vaddr); 3166 GNUNET_free (vaddr);
3167 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 3167 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
3168 return; 3168 return;
3169 } 3169 }
@@ -3267,7 +3267,7 @@ handle_tcp_data (void *cls,
3267 GNUNET_a2s (vaddr, alen)); 3267 GNUNET_a2s (vaddr, alen));
3268 GNUNET_break_op (0); 3268 GNUNET_break_op (0);
3269 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 3269 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
3270 GNUNET_free_non_null (vaddr); 3270 GNUNET_free (vaddr);
3271 return; 3271 return;
3272 } 3272 }
3273 if (GNUNET_YES == session->expecting_welcome) 3273 if (GNUNET_YES == session->expecting_welcome)
@@ -3284,7 +3284,7 @@ handle_tcp_data (void *cls,
3284 GNUNET_a2s (vaddr, alen)); 3284 GNUNET_a2s (vaddr, alen));
3285 GNUNET_break_op (0); 3285 GNUNET_break_op (0);
3286 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR); 3286 GNUNET_SERVER_receive_done (client, GNUNET_SYSERR);
3287 GNUNET_free_non_null (vaddr); 3287 GNUNET_free (vaddr);
3288 return; 3288 return;
3289 } 3289 }
3290 3290
@@ -3300,7 +3300,7 @@ handle_tcp_data (void *cls,
3300 (unsigned int) ntohs (message->type), 3300 (unsigned int) ntohs (message->type),
3301 GNUNET_i2s (&session->target), 3301 GNUNET_i2s (&session->target),
3302 GNUNET_a2s (vaddr, alen)); 3302 GNUNET_a2s (vaddr, alen));
3303 GNUNET_free_non_null (vaddr); 3303 GNUNET_free (vaddr);
3304 } 3304 }
3305 3305
3306 GNUNET_STATISTICS_update (plugin->env->stats, 3306 GNUNET_STATISTICS_update (plugin->env->stats,
@@ -3802,8 +3802,8 @@ libgnunet_plugin_transport_tcp_init (void *cls)
3802 plugin); 3802 plugin);
3803 for (ret = ret_s - 1; ret >= 0; ret--) 3803 for (ret = ret_s - 1; ret >= 0; ret--)
3804 GNUNET_free (addrs[ret]); 3804 GNUNET_free (addrs[ret]);
3805 GNUNET_free_non_null (addrs); 3805 GNUNET_free (addrs);
3806 GNUNET_free_non_null (addrlens); 3806 GNUNET_free (addrlens);
3807 } 3807 }
3808 else 3808 else
3809 { 3809 {
@@ -3893,7 +3893,7 @@ die:
3893 if (NULL != service) 3893 if (NULL != service)
3894 LEGACY_SERVICE_stop (service); 3894 LEGACY_SERVICE_stop (service);
3895 GNUNET_free (plugin); 3895 GNUNET_free (plugin);
3896 GNUNET_free_non_null (api); 3896 GNUNET_free (api);
3897 return NULL; 3897 return NULL;
3898} 3898}
3899 3899
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c
index ef4fddb24..ec3a0edd8 100644
--- a/src/transport/plugin_transport_udp.c
+++ b/src/transport/plugin_transport_udp.c
@@ -3669,7 +3669,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
3669 } 3669 }
3670 have_bind4 = GNUNET_YES; 3670 have_bind4 = GNUNET_YES;
3671 } 3671 }
3672 GNUNET_free_non_null (bind4_address); 3672 GNUNET_free (bind4_address);
3673 have_bind6 = GNUNET_NO; 3673 have_bind6 = GNUNET_NO;
3674 memset (&server_addrv6, 0, sizeof(server_addrv6)); 3674 memset (&server_addrv6, 0, sizeof(server_addrv6));
3675 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg, 3675 if (GNUNET_YES == GNUNET_CONFIGURATION_get_value_string (env->cfg,
@@ -3691,7 +3691,7 @@ libgnunet_plugin_transport_udp_init (void *cls)
3691 } 3691 }
3692 have_bind6 = GNUNET_YES; 3692 have_bind6 = GNUNET_YES;
3693 } 3693 }
3694 GNUNET_free_non_null (bind6_address); 3694 GNUNET_free (bind6_address);
3695 3695
3696 enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg, 3696 enable_broadcasting = GNUNET_CONFIGURATION_get_value_yesno (env->cfg,
3697 "transport-udp", 3697 "transport-udp",
diff --git a/src/transport/plugin_transport_wlan.c b/src/transport/plugin_transport_wlan.c
index 17d72135b..74b8d5a8a 100644
--- a/src/transport/plugin_transport_wlan.c
+++ b/src/transport/plugin_transport_wlan.c
@@ -2093,7 +2093,7 @@ LIBGNUNET_PLUGIN_TRANSPORT_DONE (void *cls)
2093 GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer); 2093 GNUNET_SERVER_mst_destroy (plugin->helper_payload_tokenizer);
2094 plugin->helper_payload_tokenizer = NULL; 2094 plugin->helper_payload_tokenizer = NULL;
2095 } 2095 }
2096 GNUNET_free_non_null (plugin->wlan_interface); 2096 GNUNET_free (plugin->wlan_interface);
2097 GNUNET_free (plugin); 2097 GNUNET_free (plugin);
2098 GNUNET_free (api); 2098 GNUNET_free (api);
2099 return NULL; 2099 return NULL;
diff --git a/src/transport/tcp_connection_legacy.c b/src/transport/tcp_connection_legacy.c
index 4e8c8140d..3e173b8a4 100644
--- a/src/transport/tcp_connection_legacy.c
+++ b/src/transport/tcp_connection_legacy.c
@@ -1088,8 +1088,8 @@ GNUNET_CONNECTION_destroy (struct GNUNET_CONNECTION_Handle *connection)
1088 * leak the socket in this special case) ... */ 1088 * leak the socket in this special case) ... */
1089 } 1089 }
1090 } 1090 }
1091 GNUNET_free_non_null (connection->addr); 1091 GNUNET_free (connection->addr);
1092 GNUNET_free_non_null (connection->hostname); 1092 GNUNET_free (connection->hostname);
1093 GNUNET_free (connection->write_buffer); 1093 GNUNET_free (connection->write_buffer);
1094 GNUNET_free (connection); 1094 GNUNET_free (connection);
1095} 1095}
diff --git a/src/transport/tcp_service_legacy.c b/src/transport/tcp_service_legacy.c
index fb4e9c3c9..12dce3993 100644
--- a/src/transport/tcp_service_legacy.c
+++ b/src/transport/tcp_service_legacy.c
@@ -657,7 +657,7 @@ LEGACY_SERVICE_get_server_addresses (
657 (EACCES == errno)) 657 (EACCES == errno))
658 { 658 {
659 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); 659 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
660 GNUNET_free_non_null (hostname); 660 GNUNET_free (hostname);
661 GNUNET_free (unixpath); 661 GNUNET_free (unixpath);
662 return GNUNET_SYSERR; 662 return GNUNET_SYSERR;
663 } 663 }
@@ -683,7 +683,7 @@ LEGACY_SERVICE_get_server_addresses (
683 _ ( 683 _ (
684 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 684 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
685 service_name); 685 service_name);
686 GNUNET_free_non_null (hostname); 686 GNUNET_free (hostname);
687 return GNUNET_SYSERR; 687 return GNUNET_SYSERR;
688 } 688 }
689 if (0 == port) 689 if (0 == port)
@@ -691,8 +691,8 @@ LEGACY_SERVICE_get_server_addresses (
691 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *)); 691 saddrs = GNUNET_malloc (2 * sizeof(struct sockaddr *));
692 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t)); 692 saddrlens = GNUNET_malloc (2 * sizeof(socklen_t));
693 add_unixpath (saddrs, saddrlens, unixpath, abstract); 693 add_unixpath (saddrs, saddrlens, unixpath, abstract);
694 GNUNET_free_non_null (unixpath); 694 GNUNET_free (unixpath);
695 GNUNET_free_non_null (hostname); 695 GNUNET_free (hostname);
696 *addrs = saddrs; 696 *addrs = saddrs;
697 *addr_lens = saddrlens; 697 *addr_lens = saddrlens;
698 return 1; 698 return 1;
@@ -716,7 +716,7 @@ LEGACY_SERVICE_get_server_addresses (
716 hostname, 716 hostname,
717 gai_strerror (ret)); 717 gai_strerror (ret));
718 GNUNET_free (hostname); 718 GNUNET_free (hostname);
719 GNUNET_free_non_null (unixpath); 719 GNUNET_free (unixpath);
720 return GNUNET_SYSERR; 720 return GNUNET_SYSERR;
721 } 721 }
722 next = res; 722 next = res;
@@ -736,7 +736,7 @@ LEGACY_SERVICE_get_server_addresses (
736 hostname); 736 hostname);
737 freeaddrinfo (res); 737 freeaddrinfo (res);
738 GNUNET_free (hostname); 738 GNUNET_free (hostname);
739 GNUNET_free_non_null (unixpath); 739 GNUNET_free (unixpath);
740 return GNUNET_SYSERR; 740 return GNUNET_SYSERR;
741 } 741 }
742 resi = i; 742 resi = i;
@@ -843,7 +843,7 @@ LEGACY_SERVICE_get_server_addresses (
843 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 843 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
844 } 844 }
845 } 845 }
846 GNUNET_free_non_null (unixpath); 846 GNUNET_free (unixpath);
847 *addrs = saddrs; 847 *addrs = saddrs;
848 *addr_lens = saddrlens; 848 *addr_lens = saddrlens;
849 return resi; 849 return resi;
@@ -1024,7 +1024,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
1024 { 1024 {
1025 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir); 1025 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "access", rdir);
1026 GNUNET_free (rdir); 1026 GNUNET_free (rdir);
1027 GNUNET_free_non_null (user); 1027 GNUNET_free (user);
1028 GNUNET_free (pif); 1028 GNUNET_free (pif);
1029 return GNUNET_SYSERR; 1029 return GNUNET_SYSERR;
1030 } 1030 }
@@ -1034,7 +1034,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
1034 { 1034 {
1035 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif); 1035 LOG_STRERROR_FILE (GNUNET_ERROR_TYPE_ERROR, "fopen", pif);
1036 GNUNET_free (pif); 1036 GNUNET_free (pif);
1037 GNUNET_free_non_null (user); 1037 GNUNET_free (user);
1038 return GNUNET_SYSERR; 1038 return GNUNET_SYSERR;
1039 } 1039 }
1040 if (0 > fprintf (pidfd, "%u", pid)) 1040 if (0 > fprintf (pidfd, "%u", pid))
@@ -1042,7 +1042,7 @@ write_pid_file (struct LEGACY_SERVICE_Context *sctx, pid_t pid)
1042 GNUNET_break (0 == fclose (pidfd)); 1042 GNUNET_break (0 == fclose (pidfd));
1043 if ((NULL != user) && (0 < strlen (user))) 1043 if ((NULL != user) && (0 < strlen (user)))
1044 GNUNET_DISK_file_change_owner (pif, user); 1044 GNUNET_DISK_file_change_owner (pif, user);
1045 GNUNET_free_non_null (user); 1045 GNUNET_free (user);
1046 GNUNET_free (pif); 1046 GNUNET_free (pif);
1047 return GNUNET_OK; 1047 return GNUNET_OK;
1048} 1048}
@@ -1441,7 +1441,7 @@ LEGACY_SERVICE_run (int argc,
1441 /* shutdown */ 1441 /* shutdown */
1442 if ((1 == do_daemonize) && (NULL != sctx.server)) 1442 if ((1 == do_daemonize) && (NULL != sctx.server))
1443 pid_file_delete (&sctx); 1443 pid_file_delete (&sctx);
1444 GNUNET_free_non_null (sctx.my_handlers); 1444 GNUNET_free (sctx.my_handlers);
1445 1445
1446shutdown: 1446shutdown:
1447 if (-1 != sctx.ready_confirm_fd) 1447 if (-1 != sctx.ready_confirm_fd)
@@ -1475,16 +1475,16 @@ shutdown:
1475 if (NULL != sctx.addrs) 1475 if (NULL != sctx.addrs)
1476 while (NULL != sctx.addrs[i]) 1476 while (NULL != sctx.addrs[i])
1477 GNUNET_free_nz (sctx.addrs[i++]); 1477 GNUNET_free_nz (sctx.addrs[i++]);
1478 GNUNET_free_non_null (sctx.addrs); 1478 GNUNET_free (sctx.addrs);
1479 GNUNET_free_non_null (sctx.addrlens); 1479 GNUNET_free (sctx.addrlens);
1480 GNUNET_free_non_null (logfile); 1480 GNUNET_free (logfile);
1481 GNUNET_free_non_null (loglev); 1481 GNUNET_free (loglev);
1482 GNUNET_free (cfg_fn); 1482 GNUNET_free (cfg_fn);
1483 GNUNET_free_non_null (opt_cfg_fn); 1483 GNUNET_free (opt_cfg_fn);
1484 GNUNET_free_non_null (sctx.v4_denied); 1484 GNUNET_free (sctx.v4_denied);
1485 GNUNET_free_non_null (sctx.v6_denied); 1485 GNUNET_free (sctx.v6_denied);
1486 GNUNET_free_non_null (sctx.v4_allowed); 1486 GNUNET_free (sctx.v4_allowed);
1487 GNUNET_free_non_null (sctx.v6_allowed); 1487 GNUNET_free (sctx.v6_allowed);
1488 1488
1489 return err ? GNUNET_SYSERR : sctx.ret; 1489 return err ? GNUNET_SYSERR : sctx.ret;
1490} 1490}
@@ -1626,7 +1626,7 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
1626 } 1626 }
1627 if (NULL != sctx->server) 1627 if (NULL != sctx->server)
1628 GNUNET_SERVER_destroy (sctx->server); 1628 GNUNET_SERVER_destroy (sctx->server);
1629 GNUNET_free_non_null (sctx->my_handlers); 1629 GNUNET_free (sctx->my_handlers);
1630 if (NULL != sctx->addrs) 1630 if (NULL != sctx->addrs)
1631 { 1631 {
1632 i = 0; 1632 i = 0;
@@ -1634,11 +1634,11 @@ LEGACY_SERVICE_stop (struct LEGACY_SERVICE_Context *sctx)
1634 GNUNET_free_nz (sctx->addrs[i++]); 1634 GNUNET_free_nz (sctx->addrs[i++]);
1635 GNUNET_free (sctx->addrs); 1635 GNUNET_free (sctx->addrs);
1636 } 1636 }
1637 GNUNET_free_non_null (sctx->addrlens); 1637 GNUNET_free (sctx->addrlens);
1638 GNUNET_free_non_null (sctx->v4_denied); 1638 GNUNET_free (sctx->v4_denied);
1639 GNUNET_free_non_null (sctx->v6_denied); 1639 GNUNET_free (sctx->v6_denied);
1640 GNUNET_free_non_null (sctx->v4_allowed); 1640 GNUNET_free (sctx->v4_allowed);
1641 GNUNET_free_non_null (sctx->v6_allowed); 1641 GNUNET_free (sctx->v6_allowed);
1642 GNUNET_free (sctx); 1642 GNUNET_free (sctx);
1643} 1643}
1644 1644
diff --git a/src/transport/test_http_common.c b/src/transport/test_http_common.c
index 6e31ec85e..fe6e4faa3 100644
--- a/src/transport/test_http_common.c
+++ b/src/transport/test_http_common.c
@@ -32,9 +32,9 @@ clean (struct SplittedHTTPAddress *addr)
32{ 32{
33 if (NULL == addr) 33 if (NULL == addr)
34 return; 34 return;
35 GNUNET_free_non_null (addr->host); 35 GNUNET_free (addr->host);
36 GNUNET_free_non_null (addr->path); 36 GNUNET_free (addr->path);
37 GNUNET_free_non_null (addr->protocol); 37 GNUNET_free (addr->protocol);
38 GNUNET_free (addr); 38 GNUNET_free (addr);
39} 39}
40 40
diff --git a/src/transport/transport-testing-main.c b/src/transport/transport-testing-main.c
index 8c35ff252..20c58eeee 100644
--- a/src/transport/transport-testing-main.c
+++ b/src/transport/transport-testing-main.c
@@ -604,7 +604,7 @@ GNUNET_TRANSPORT_TESTING_main_ (const char *argv0,
604 for (unsigned int i = 0; i < num_peers; i++) 604 for (unsigned int i = 0; i < num_peers; i++)
605 GNUNET_free (cfg_names[i]); 605 GNUNET_free (cfg_names[i]);
606 GNUNET_free (test_source); 606 GNUNET_free (test_source);
607 GNUNET_free_non_null (test_plugin); 607 GNUNET_free (test_plugin);
608 GNUNET_free (test_name); 608 GNUNET_free (test_name);
609 return ret; 609 return ret;
610} 610}
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 06dbe891a..2da193b31 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -349,7 +349,7 @@ get_hello (void *cb_cls,
349 GNUNET_assert (0 == memcmp (&hello_id, 349 GNUNET_assert (0 == memcmp (&hello_id,
350 &p->id, 350 &p->id,
351 sizeof(hello_id))); 351 sizeof(hello_id)));
352 GNUNET_free_non_null (p->hello); 352 GNUNET_free (p->hello);
353 p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message); 353 p->hello = (struct GNUNET_HELLO_Message *) GNUNET_copy_message (message);
354 354
355 if (NULL != p->start_cb) 355 if (NULL != p->start_cb)
@@ -460,10 +460,10 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct
460 cfgname, 460 cfgname,
461 emsg); 461 emsg);
462 GNUNET_TRANSPORT_TESTING_stop_peer (p); 462 GNUNET_TRANSPORT_TESTING_stop_peer (p);
463 GNUNET_free_non_null (emsg); 463 GNUNET_free (emsg);
464 return NULL; 464 return NULL;
465 } 465 }
466 GNUNET_free_non_null (emsg); 466 GNUNET_free (emsg);
467 if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer)) 467 if (GNUNET_OK != GNUNET_TESTING_peer_start (p->peer))
468 { 468 {
469 LOG (GNUNET_ERROR_TYPE_ERROR, 469 LOG (GNUNET_ERROR_TYPE_ERROR,
diff --git a/src/transport/transport_api2_core.c b/src/transport/transport_api2_core.c
index cd8bacf3d..002af81fc 100644
--- a/src/transport/transport_api2_core.c
+++ b/src/transport/transport_api2_core.c
@@ -762,7 +762,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
762 reconnect (h); 762 reconnect (h);
763 if (NULL == h->mq) 763 if (NULL == h->mq)
764 { 764 {
765 GNUNET_free_non_null (h->handlers); 765 GNUNET_free (h->handlers);
766 GNUNET_free (h); 766 GNUNET_free (h);
767 return NULL; 767 return NULL;
768 } 768 }
@@ -792,7 +792,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
792 } 792 }
793 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); 793 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
794 handle->neighbours = NULL; 794 handle->neighbours = NULL;
795 GNUNET_free_non_null (handle->handlers); 795 GNUNET_free (handle->handlers);
796 handle->handlers = NULL; 796 handle->handlers = NULL;
797 GNUNET_free (handle); 797 GNUNET_free (handle);
798} 798}
diff --git a/src/transport/transport_api_core.c b/src/transport/transport_api_core.c
index 5d841fa10..55647508d 100644
--- a/src/transport/transport_api_core.c
+++ b/src/transport/transport_api_core.c
@@ -891,7 +891,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
891 reconnect (h); 891 reconnect (h);
892 if (NULL == h->mq) 892 if (NULL == h->mq)
893 { 893 {
894 GNUNET_free_non_null (h->handlers); 894 GNUNET_free (h->handlers);
895 GNUNET_free (h); 895 GNUNET_free (h);
896 return NULL; 896 return NULL;
897 } 897 }
@@ -922,7 +922,7 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle)
922 } 922 }
923 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours); 923 GNUNET_CONTAINER_multipeermap_destroy (handle->neighbours);
924 handle->neighbours = NULL; 924 handle->neighbours = NULL;
925 GNUNET_free_non_null (handle->handlers); 925 GNUNET_free (handle->handlers);
926 handle->handlers = NULL; 926 handle->handlers = NULL;
927 GNUNET_free (handle); 927 GNUNET_free (handle);
928} 928}