X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fsrc%2Frouters%2Fiplookup.c;h=9dafd6fa536979afd02a90da23ec496b02638cc6;hb=afb3eaaf294ae786644e05e7943b9a71f9bc6c3a;hp=e7fba34470426cd1253a99bf9387f95a26074ad1;hpb=fd6de02e0406522ba0cfff43d6be5b0201200b95;p=exim.git diff --git a/src/src/routers/iplookup.c b/src/src/routers/iplookup.c index e7fba3447..9dafd6fa5 100644 --- a/src/src/routers/iplookup.c +++ b/src/src/routers/iplookup.c @@ -1,10 +1,10 @@ -/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.4 2005/09/12 15:09:55 ph10 Exp $ */ +/* $Cambridge: exim/src/src/routers/iplookup.c,v 1.7 2006/04/04 09:09:45 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2005 */ +/* Copyright (c) University of Cambridge 1995 - 2006 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -202,7 +202,7 @@ while ((hostname = string_nextinlist(&listptr, &sep, host_buffer, host->mx = MX_NONE; host->next = NULL; - if (string_is_ip_address(host->name, NULL)) + if (string_is_ip_address(host->name, NULL) != 0) host->address = host->name; else { @@ -240,6 +240,7 @@ while ((hostname = string_nextinlist(&listptr, &sep, host_buffer, if (ip_connect(query_socket, host_af, h->address,ob->port, ob->timeout) < 0) { + close(query_socket); DEBUG(D_route) debug_printf("connection to %s failed: %s\n", h->address, strerror(errno));