Commit 6458ad3a authored by Mark Andrews's avatar Mark Andrews
Browse files

address use after free error

parent 95273fcb
......@@ -616,7 +616,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 = ISC_R_SUCCESS;
......@@ -649,6 +649,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,
......@@ -656,7 +657,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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment