From d8e970f4940975bde07b64a5f01303ec379b838a Mon Sep 17 00:00:00 2001 From: Steven Schubiger Date: Fri, 18 Apr 2008 22:04:37 +0200 Subject: [PATCH] Use Gnulib's alloc functions in connect.c. --- src/connect.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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; } } -- 2.39.2