mirror of
https://github.com/isc-projects/bind9.git
synced 2026-02-25 19:04:57 -05:00
race condition [RT #670]
This commit is contained in:
parent
93f40401c8
commit
bda8d67fd4
1 changed files with 8 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue