mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 12:50:00 -04:00
cleanup properly if we fail to initialize ns_client structure
If taskmgr is shutting down ns_client_setup will fail to create a task for the newly created client, we weren't cleaning up already created/attached things (memory context, server, clientmgr).
This commit is contained in:
parent
f75a9e32be
commit
dcc0835a3a
1 changed files with 10 additions and 0 deletions
|
|
@ -2333,6 +2333,16 @@ ns__client_setup(ns_client_t *client, ns_clientmgr_t *mgr, bool new) {
|
|||
isc_task_detach(&client->task);
|
||||
}
|
||||
|
||||
if (client->manager != NULL) {
|
||||
clientmgr_detach(&client->manager);
|
||||
}
|
||||
if (client->mctx != NULL) {
|
||||
isc_mem_detach(&client->mctx);
|
||||
}
|
||||
if (client->sctx != NULL) {
|
||||
ns_server_detach(&client->sctx);
|
||||
}
|
||||
|
||||
return (result);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue