mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 16:50:00 -04:00
Fix memory context leak in dns_client_resolve() error path
Use isc_mem_putanddetach() instead of isc_mem_put() to properly detach the attached memory context stored in resarg->mctx.
This commit is contained in:
parent
5c8d64499e
commit
d0165070c7
1 changed files with 1 additions and 1 deletions
|
|
@ -953,7 +953,7 @@ dns_client_resolve(dns_client_t *client, const dns_name_t *name,
|
|||
result = startresolve(client, name, rdclass, type, options,
|
||||
resolve_done, resarg, &resarg->trans);
|
||||
if (result != ISC_R_SUCCESS) {
|
||||
isc_mem_put(client->mctx, resarg, sizeof(*resarg));
|
||||
isc_mem_putanddetach(&resarg->mctx, resarg, sizeof(*resarg));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue