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;
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,
"could not start lwres "
"client handler: %s",
isc_result_totext(result));
- cm = ISC_LIST_NEXT(cm, link);
+ cm = next;
}
UNLOCK(&listener->lock);