mirror of
https://github.com/mirror/wget.git
synced 2025-01-24 11:20:13 +08:00
Use Gnulib's alloc functions in connect.c.
This commit is contained in:
parent
34747d72eb
commit
d8e970f494
@ -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
|
shall include the source code for the parts of OpenSSL used as well
|
||||||
as that of the covered work. */
|
as that of the covered work. */
|
||||||
|
|
||||||
|
#define USE_GNULIB_ALLOC
|
||||||
|
|
||||||
#include "wget.h"
|
#include "wget.h"
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -766,7 +768,7 @@ fd_register_transport (int fd, struct transport_implementation *imp, void *ctx)
|
|||||||
hash key. */
|
hash key. */
|
||||||
assert (fd >= 0);
|
assert (fd >= 0);
|
||||||
|
|
||||||
info = xnew (struct transport_info);
|
info = xmalloc (sizeof (struct transport_info));
|
||||||
info->imp = imp;
|
info->imp = imp;
|
||||||
info->ctx = ctx;
|
info->ctx = ctx;
|
||||||
if (!transport_map)
|
if (!transport_map)
|
||||||
@ -958,7 +960,7 @@ fd_close (int fd)
|
|||||||
if (info)
|
if (info)
|
||||||
{
|
{
|
||||||
hash_table_remove (transport_map, (void *)(intptr_t) fd);
|
hash_table_remove (transport_map, (void *)(intptr_t) fd);
|
||||||
xfree (info);
|
free (info);
|
||||||
++transport_map_modified_tick;
|
++transport_map_modified_tick;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user