aboutsummaryrefslogtreecommitdiff
path: root/src/util/service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/service.c')
-rw-r--r--src/util/service.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/util/service.c b/src/util/service.c
index ea078b19b..1b80c8d13 100644
--- a/src/util/service.c
+++ b/src/util/service.c
@@ -1144,7 +1144,7 @@ get_server_addresses (const char *service_name,
1144 (EACCES == errno)) 1144 (EACCES == errno))
1145 { 1145 {
1146 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket"); 1146 LOG_STRERROR (GNUNET_ERROR_TYPE_ERROR, "socket");
1147 GNUNET_free_non_null (hostname); 1147 GNUNET_free (hostname);
1148 GNUNET_free (unixpath); 1148 GNUNET_free (unixpath);
1149 return GNUNET_SYSERR; 1149 return GNUNET_SYSERR;
1150 } 1150 }
@@ -1170,7 +1170,7 @@ get_server_addresses (const char *service_name,
1170 _ ( 1170 _ (
1171 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"), 1171 "Have neither PORT nor UNIXPATH for service `%s', but one is required\n"),
1172 service_name); 1172 service_name);
1173 GNUNET_free_non_null (hostname); 1173 GNUNET_free (hostname);
1174 return GNUNET_SYSERR; 1174 return GNUNET_SYSERR;
1175 } 1175 }
1176 if (0 == port) 1176 if (0 == port)
@@ -1178,8 +1178,8 @@ get_server_addresses (const char *service_name,
1178 saddrs = GNUNET_new_array (2, struct sockaddr *); 1178 saddrs = GNUNET_new_array (2, struct sockaddr *);
1179 saddrlens = GNUNET_new_array (2, socklen_t); 1179 saddrlens = GNUNET_new_array (2, socklen_t);
1180 add_unixpath (saddrs, saddrlens, unixpath); 1180 add_unixpath (saddrs, saddrlens, unixpath);
1181 GNUNET_free_non_null (unixpath); 1181 GNUNET_free (unixpath);
1182 GNUNET_free_non_null (hostname); 1182 GNUNET_free (hostname);
1183 *addrs = saddrs; 1183 *addrs = saddrs;
1184 *addr_lens = saddrlens; 1184 *addr_lens = saddrlens;
1185 return 1; 1185 return 1;
@@ -1203,7 +1203,7 @@ get_server_addresses (const char *service_name,
1203 hostname, 1203 hostname,
1204 gai_strerror (ret)); 1204 gai_strerror (ret));
1205 GNUNET_free (hostname); 1205 GNUNET_free (hostname);
1206 GNUNET_free_non_null (unixpath); 1206 GNUNET_free (unixpath);
1207 return GNUNET_SYSERR; 1207 return GNUNET_SYSERR;
1208 } 1208 }
1209 next = res; 1209 next = res;
@@ -1223,7 +1223,7 @@ get_server_addresses (const char *service_name,
1223 hostname); 1223 hostname);
1224 freeaddrinfo (res); 1224 freeaddrinfo (res);
1225 GNUNET_free (hostname); 1225 GNUNET_free (hostname);
1226 GNUNET_free_non_null (unixpath); 1226 GNUNET_free (unixpath);
1227 return GNUNET_SYSERR; 1227 return GNUNET_SYSERR;
1228 } 1228 }
1229 resi = i; 1229 resi = i;
@@ -1330,7 +1330,7 @@ get_server_addresses (const char *service_name,
1330 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port); 1330 ((struct sockaddr_in *) saddrs[i])->sin_port = htons (port);
1331 } 1331 }
1332 } 1332 }
1333 GNUNET_free_non_null (unixpath); 1333 GNUNET_free (unixpath);
1334 *addrs = saddrs; 1334 *addrs = saddrs;
1335 *addr_lens = saddrlens; 1335 *addr_lens = saddrlens;
1336 return resi; 1336 return resi;
@@ -1557,8 +1557,8 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
1557 } 1557 }
1558 GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc); 1558 GNUNET_CONTAINER_DLL_insert (sh->slc_head, sh->slc_tail, slc);
1559 } 1559 }
1560 GNUNET_free_non_null (addrlens); 1560 GNUNET_free (addrlens);
1561 GNUNET_free_non_null (addrs); 1561 GNUNET_free (addrs);
1562 if ((0 != num) && (NULL == sh->slc_head)) 1562 if ((0 != num) && (NULL == sh->slc_head))
1563 { 1563 {
1564 /* All attempts to bind failed, hard failure */ 1564 /* All attempts to bind failed, hard failure */
@@ -1566,7 +1566,7 @@ setup_service (struct GNUNET_SERVICE_Handle *sh)
1566 GNUNET_ERROR_TYPE_ERROR, 1566 GNUNET_ERROR_TYPE_ERROR,
1567 _ ( 1567 _ (
1568 "Could not bind to any of the ports I was supposed to, refusing to run!\n")); 1568 "Could not bind to any of the ports I was supposed to, refusing to run!\n"));
1569 GNUNET_free_non_null (csocks); 1569 GNUNET_free (csocks);
1570 return GNUNET_SYSERR; 1570 return GNUNET_SYSERR;
1571 } 1571 }
1572 } 1572 }
@@ -1793,10 +1793,10 @@ teardown_service (struct GNUNET_SERVICE_Handle *sh)
1793{ 1793{
1794 struct ServiceListenContext *slc; 1794 struct ServiceListenContext *slc;
1795 1795
1796 GNUNET_free_non_null (sh->v4_denied); 1796 GNUNET_free (sh->v4_denied);
1797 GNUNET_free_non_null (sh->v6_denied); 1797 GNUNET_free (sh->v6_denied);
1798 GNUNET_free_non_null (sh->v4_allowed); 1798 GNUNET_free (sh->v4_allowed);
1799 GNUNET_free_non_null (sh->v6_allowed); 1799 GNUNET_free (sh->v6_allowed);
1800 while (NULL != (slc = sh->slc_head)) 1800 while (NULL != (slc = sh->slc_head))
1801 { 1801 {
1802 GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc); 1802 GNUNET_CONTAINER_DLL_remove (sh->slc_head, sh->slc_tail, slc);
@@ -1890,7 +1890,7 @@ GNUNET_SERVICE_start (const char *service_name,
1890 sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL); 1890 sh->handlers = GNUNET_MQ_copy_handlers2 (handlers, &return_agpl, NULL);
1891 if (GNUNET_OK != setup_service (sh)) 1891 if (GNUNET_OK != setup_service (sh))
1892 { 1892 {
1893 GNUNET_free_non_null (sh->handlers); 1893 GNUNET_free (sh->handlers);
1894 GNUNET_free (sh); 1894 GNUNET_free (sh);
1895 return NULL; 1895 return NULL;
1896 } 1896 }
@@ -1913,7 +1913,7 @@ GNUNET_SERVICE_stop (struct GNUNET_SERVICE_Handle *srv)
1913 while (NULL != (client = srv->clients_head)) 1913 while (NULL != (client = srv->clients_head))
1914 GNUNET_SERVICE_client_drop (client); 1914 GNUNET_SERVICE_client_drop (client);
1915 teardown_service (srv); 1915 teardown_service (srv);
1916 GNUNET_free_non_null (srv->handlers); 1916 GNUNET_free (srv->handlers);
1917 GNUNET_free (srv); 1917 GNUNET_free (srv);
1918} 1918}
1919 1919
@@ -2159,13 +2159,13 @@ shutdown:
2159 } 2159 }
2160#endif 2160#endif
2161 teardown_service (&sh); 2161 teardown_service (&sh);
2162 GNUNET_free_non_null (sh.handlers); 2162 GNUNET_free (sh.handlers);
2163 GNUNET_SPEEDUP_stop_ (); 2163 GNUNET_SPEEDUP_stop_ ();
2164 GNUNET_CONFIGURATION_destroy (cfg); 2164 GNUNET_CONFIGURATION_destroy (cfg);
2165 GNUNET_free_non_null (logfile); 2165 GNUNET_free (logfile);
2166 GNUNET_free_non_null (loglev); 2166 GNUNET_free (loglev);
2167 GNUNET_free (cfg_filename); 2167 GNUNET_free (cfg_filename);
2168 GNUNET_free_non_null (opt_cfg_filename); 2168 GNUNET_free (opt_cfg_filename);
2169 2169
2170 return err ? GNUNET_SYSERR : sh.ret; 2170 return err ? GNUNET_SYSERR : sh.ret;
2171} 2171}