-indentation
[oweals/gnunet.git] / src / nat / gnunet-nat-server.c
index e971bd3b1d5715ba0928d9618c430e0592ed57f9..82e39ee16568da59d95db8e05a6c7da12556c345 100644 (file)
@@ -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);
@@ -320,7 +320,11 @@ main (int argc, char *const argv[])
       GNUNET_PROGRAM_run (argc, argv, "gnunet-nat-server [options] PORT",
                           _("GNUnet NAT traversal test helper daemon"), options,
                           &run, NULL))
+  {
+    GNUNET_free ((void*) argv);
     return 1;
+  }
+  GNUNET_free ((void*) argv);
   return 0;
 }