]> sjero.net Git - wget/blobdiff - src/connect.c
Use Gnulib's alloc functions throughout the source.
[wget] / src / connect.c
index d8e20368be0ff56e107f7e28219383253fa5dcad..361eb56b787291f4d84038270cfe3c79ba42ce75 100644 (file)
@@ -768,7 +768,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 +960,7 @@ fd_close (int fd)
   if (info)
     {
       hash_table_remove (transport_map, (void *)(intptr_t) fd);
-      free (info);
+      xfree (info);
       ++transport_map_modified_tick;
     }
 }