summaryrefslogtreecommitdiff
path: root/src/nat/gnunet-nat-server.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nat/gnunet-nat-server.c')
-rw-r--r--src/nat/gnunet-nat-server.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nat/gnunet-nat-server.c b/src/nat/gnunet-nat-server.c
index 1a98cdc96..82e39ee16 100644
--- a/src/nat/gnunet-nat-server.c
+++ b/src/nat/gnunet-nat-server.c
@@ -152,7 +152,7 @@ try_send_tcp (uint32_t dst_ipv4, uint16_t dport, uint16_t data)
GNUNET_NETWORK_socket_close (s);
return;
}
- ctx = GNUNET_malloc (sizeof (struct TcpContext));
+ ctx = GNUNET_new (struct TcpContext);
ctx->s = s;
ctx->data = data;
GNUNET_SCHEDULER_add_write_net (GNUNET_TIME_UNIT_SECONDS, s, &tcp_send, ctx);