diff options
author | LRN <lrn1986@gmail.com> | 2013-12-19 06:00:23 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-19 06:00:23 +0000 |
commit | e0ca7357cd0bfedc5c29cb731b56279fef8da059 (patch) | |
tree | ecfd47cf59bc00e656b53fd59c58f5038e342d65 /src/transport/plugin_transport_http_server.c | |
parent | 92fd84dc7ef98452f848a62677c61a2b80b5835e (diff) | |
download | gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.tar.gz gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.zip |
malloc -> new
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r-- | src/transport/plugin_transport_http_server.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c index f08c7072a..15c0323c6 100644 --- a/src/transport/plugin_transport_http_server.c +++ b/src/transport/plugin_transport_http_server.c | |||
@@ -2219,7 +2219,7 @@ server_add_address (void *cls, int add_remove, const struct sockaddr *addr, | |||
2219 | struct HTTP_Server_Plugin *plugin = cls; | 2219 | struct HTTP_Server_Plugin *plugin = cls; |
2220 | struct HttpAddressWrapper *w = NULL; | 2220 | struct HttpAddressWrapper *w = NULL; |
2221 | 2221 | ||
2222 | w = GNUNET_malloc (sizeof (struct HttpAddressWrapper)); | 2222 | w = GNUNET_new (struct HttpAddressWrapper); |
2223 | w->address = http_common_address_from_socket (plugin->protocol, addr, addrlen); | 2223 | w->address = http_common_address_from_socket (plugin->protocol, addr, addrlen); |
2224 | if (NULL == w->address) | 2224 | if (NULL == w->address) |
2225 | { | 2225 | { |
@@ -2769,7 +2769,7 @@ server_configure_plugin (struct HTTP_Server_Plugin *plugin) | |||
2769 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 2769 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
2770 | "Binding %s plugin to specific IPv4 address: `%s'\n", | 2770 | "Binding %s plugin to specific IPv4 address: `%s'\n", |
2771 | plugin->protocol, bind4_address); | 2771 | plugin->protocol, bind4_address); |
2772 | plugin->server_addr_v4 = GNUNET_malloc (sizeof (struct sockaddr_in)); | 2772 | plugin->server_addr_v4 = GNUNET_new (struct sockaddr_in); |
2773 | if (1 != inet_pton (AF_INET, bind4_address, | 2773 | if (1 != inet_pton (AF_INET, bind4_address, |
2774 | &plugin->server_addr_v4->sin_addr)) | 2774 | &plugin->server_addr_v4->sin_addr)) |
2775 | { | 2775 | { |
@@ -2800,7 +2800,7 @@ server_configure_plugin (struct HTTP_Server_Plugin *plugin) | |||
2800 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, | 2800 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, plugin->name, |
2801 | "Binding %s plugin to specific IPv6 address: `%s'\n", | 2801 | "Binding %s plugin to specific IPv6 address: `%s'\n", |
2802 | plugin->protocol, bind6_address); | 2802 | plugin->protocol, bind6_address); |
2803 | plugin->server_addr_v6 = GNUNET_malloc (sizeof (struct sockaddr_in6)); | 2803 | plugin->server_addr_v6 = GNUNET_new (struct sockaddr_in6); |
2804 | if (1 != | 2804 | if (1 != |
2805 | inet_pton (AF_INET6, bind6_address, &plugin->server_addr_v6->sin6_addr)) | 2805 | inet_pton (AF_INET6, bind6_address, &plugin->server_addr_v6->sin6_addr)) |
2806 | { | 2806 | { |