summaryrefslogtreecommitdiff
path: root/contrib/bind9/lib/lwres/getipnode.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind9/lib/lwres/getipnode.c')
-rw-r--r--contrib/bind9/lib/lwres/getipnode.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/contrib/bind9/lib/lwres/getipnode.c b/contrib/bind9/lib/lwres/getipnode.c
index 5bda15e6e04b..9b1a07bdda7b 100644
--- a/contrib/bind9/lib/lwres/getipnode.c
+++ b/contrib/bind9/lib/lwres/getipnode.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: getipnode.c,v 1.30.2.4.2.4 2004/03/06 08:15:31 marka Exp $ */
+/* $Id: getipnode.c,v 1.30.2.4.2.6 2005/04/29 00:03:32 marka Exp $ */
#include <config.h>
@@ -331,6 +331,8 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
n = lwres_getnamebyaddr(lwrctx, LWRES_ADDRTYPE_V6, IN6ADDRSZ,
src, &by);
if (n != 0) {
+ lwres_conf_clear(lwrctx);
+ lwres_context_destroy(&lwrctx);
*error_num = HOST_NOT_FOUND;
return (NULL);
}
@@ -338,6 +340,7 @@ lwres_getipnodebyaddr(const void *src, size_t len, int af, int *error_num) {
lwres_gnbaresponse_free(lwrctx, &by);
if (he1 == NULL)
*error_num = NO_RECOVERY;
+ lwres_conf_clear(lwrctx);
lwres_context_destroy(&lwrctx);
return (he1);
}