[svn] Free INFO even if it doesn't register a closer.

This commit is contained in:
hniksic 2003-11-05 17:15:44 -08:00
parent 1484fe09f5
commit 49dfcb6036
2 changed files with 10 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
* connect.c (xclose): Free INFO even if it doesn't provide a
closer.
2003-11-06 Hrvoje Niksic <hniksic@xemacs.org>
* connect.c: Updated all callers of

View File

@ -753,12 +753,14 @@ xclose (int fd)
info = hash_table_get (extended_map, (void *) fd);
if (info && info->closer)
info->closer (fd, info->ctx);
else
sock_close (fd);
if (info)
{
info->closer (fd, info->ctx);
hash_table_remove (extended_map, (void *) fd);
xfree (info);
++extended_map_modified_tick;
}
else
sock_close (fd);
}