aboutsummaryrefslogtreecommitdiff
path: root/bin/named/lwresd.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/named/lwresd.c')
-rw-r--r--bin/named/lwresd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/bin/named/lwresd.c b/bin/named/lwresd.c
index 7ee2196364e9..f9ed544fc2e2 100644
--- a/bin/named/lwresd.c
+++ b/bin/named/lwresd.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2004-2009, 2012 Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2004-2009, 2012, 2015 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000-2003 Internet Software Consortium.
*
* Permission to use, copy, modify, and/or distribute this software for any
@@ -602,7 +602,7 @@ listener_copysock(ns_lwreslistener_t *oldlistener,
static isc_result_t
listener_startclients(ns_lwreslistener_t *listener) {
- ns_lwdclientmgr_t *cm;
+ ns_lwdclientmgr_t *cm, *next;
unsigned int i;
isc_result_t result;
@@ -626,6 +626,7 @@ listener_startclients(ns_lwreslistener_t *listener) {
LOCK(&listener->lock);
cm = ISC_LIST_HEAD(listener->cmgrs);
while (cm != NULL) {
+ next = ISC_LIST_NEXT(cm, link);
result = ns_lwdclient_startrecv(cm);
if (result != ISC_R_SUCCESS)
isc_log_write(ns_g_lctx, NS_LOGCATEGORY_GENERAL,
@@ -633,7 +634,7 @@ listener_startclients(ns_lwreslistener_t *listener) {
"could not start lwres "
"client handler: %s",
isc_result_totext(result));
- cm = ISC_LIST_NEXT(cm, link);
+ cm = next;
}
UNLOCK(&listener->lock);