From: Steven Schubiger Date: Fri, 18 Apr 2008 20:04:37 +0000 (+0200) Subject: Use Gnulib's alloc functions in connect.c. X-Git-Tag: v1.13~421^2~12^2~28^2~18 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=d8e970f4940975bde07b64a5f01303ec379b838a Use Gnulib's alloc functions in connect.c. --- diff --git a/src/connect.c b/src/connect.c index 2626ef32..d8e20368 100644 --- a/src/connect.c +++ b/src/connect.c @@ -28,6 +28,8 @@ 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 @@ -766,7 +768,7 @@ fd_register_transport (int fd, struct transport_implementation *imp, void *ctx) hash key. */ assert (fd >= 0); - info = xnew (struct transport_info); + info = xmalloc (sizeof (struct transport_info)); info->imp = imp; info->ctx = ctx; if (!transport_map) @@ -958,7 +960,7 @@ fd_close (int fd) if (info) { hash_table_remove (transport_map, (void *)(intptr_t) fd); - xfree (info); + free (info); ++transport_map_modified_tick; } }