mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
race condition [RT #670]
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: client.c,v 1.138 2001/01/09 21:39:41 bwelling Exp $ */
|
||||
/* $Id: client.c,v 1.139 2001/01/16 23:02:58 gson Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
@@ -256,8 +256,6 @@ client_free(ns_client_t *client) {
|
||||
isc_buffer_free(&client->opt_view);
|
||||
#endif /* DNS_OPT_NEWCODES */
|
||||
dns_message_destroy(&client->message);
|
||||
if (client->task != NULL)
|
||||
isc_task_detach(&client->task);
|
||||
if (client->manager != NULL) {
|
||||
manager = client->manager;
|
||||
LOCK(&manager->lock);
|
||||
@@ -269,6 +267,13 @@ client_free(ns_client_t *client) {
|
||||
need_clientmgr_destroy = ISC_TRUE;
|
||||
UNLOCK(&manager->lock);
|
||||
}
|
||||
/*
|
||||
* Detaching the task must be done after unlinking from
|
||||
* the manager's lists because the manager accesses
|
||||
* client->task.
|
||||
*/
|
||||
if (client->task != NULL)
|
||||
isc_task_detach(&client->task);
|
||||
|
||||
CTRACE("free");
|
||||
client->magic = 0;
|
||||
|
Reference in New Issue
Block a user