]> sjero.net Git - wget/blobdiff - src/connect.c
Restore string after function call.
[wget] / src / connect.c
index d8e20368be0ff56e107f7e28219383253fa5dcad..f46f11c44461017a2dce3549622268f7fc0fea70 100644 (file)
@@ -28,8 +28,6 @@ Corresponding Source for a non-source form of such a combination
 shall include the source code for the parts of OpenSSL used as well
 as that of the covered work.  */
 
-#define USE_GNULIB_ALLOC
-
 #include "wget.h"
 
 #include <stdio.h>
@@ -61,6 +59,11 @@ as that of the covered work.  */
 #include "connect.h"
 #include "hash.h"
 
+/* Apparently needed for Interix: */
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
 /* Define sockaddr_storage where unavailable (presumably on IPv4-only
    hosts).  */
 
@@ -270,7 +273,7 @@ connect_to_ip (const ip_address *ip, int port, const char *print)
       const char *txt_addr = print_address (ip);
       if (print && 0 != strcmp (print, txt_addr))
         logprintf (LOG_VERBOSE, _("Connecting to %s|%s|:%d... "),
-                   escnonprint (print), txt_addr, port);
+                   escnonprint_uri (print), txt_addr, port);
       else
         logprintf (LOG_VERBOSE, _("Connecting to %s:%d... "), txt_addr, port);
     }
@@ -768,7 +771,7 @@ fd_register_transport (int fd, struct transport_implementation *imp, void *ctx)
      hash key.  */
   assert (fd >= 0);
 
-  info = xmalloc (sizeof (struct transport_info));
+  info = xnew (struct transport_info);
   info->imp = imp;
   info->ctx = ctx;
   if (!transport_map)
@@ -960,7 +963,7 @@ fd_close (int fd)
   if (info)
     {
       hash_table_remove (transport_map, (void *)(intptr_t) fd);
-      free (info);
+      xfree (info);
       ++transport_map_modified_tick;
     }
 }