2
0
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:
Andreas Gustafsson
2001-01-16 23:02:58 +00:00
parent 93f40401c8
commit bda8d67fd4

View File

@@ -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;