aboutsummaryrefslogtreecommitdiff
path: root/resolv/res-close.c
diff options
context:
space:
mode:
Diffstat (limited to 'resolv/res-close.c')
-rw-r--r--resolv/res-close.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/resolv/res-close.c b/resolv/res-close.c
index 97da73c99c..21f038c2c7 100644
--- a/resolv/res-close.c
+++ b/resolv/res-close.c
@@ -84,6 +84,7 @@
#include <resolv-internal.h>
#include <resolv_context.h>
+#include <resolv_conf.h>
#include <not-cancel.h>
/* Close all open sockets. If FREE_ADDR is true, deallocate any
@@ -111,6 +112,8 @@ __res_iclose (res_state statp, bool free_addr)
statp->_u._ext.nsaddrs[ns] = NULL;
}
}
+ if (free_addr)
+ __resolv_conf_detach (statp);
}
libc_hidden_def (__res_iclose)