mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-11 08:30:00 -04:00
Fix dns_fwdtable_addfwd() error path cleanup bug
Free 'sizeof(dns_forwarder_t)' bytes of memory instead of
'sizeof(dns_sockaddr_t)' bytes, because `fwd` is a pointer
to a 'dns_forwarder_t' type structure.
(cherry picked from commit 0cc1b06d98)
This commit is contained in:
parent
6d3c38e381
commit
64c8e63942
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ cleanup:
|
|||
while (!ISC_LIST_EMPTY(forwarders->fwdrs)) {
|
||||
fwd = ISC_LIST_HEAD(forwarders->fwdrs);
|
||||
ISC_LIST_UNLINK(forwarders->fwdrs, fwd, link);
|
||||
isc_mem_put(fwdtable->mctx, fwd, sizeof(isc_sockaddr_t));
|
||||
isc_mem_put(fwdtable->mctx, fwd, sizeof(dns_forwarder_t));
|
||||
}
|
||||
isc_mem_put(fwdtable->mctx, forwarders, sizeof(dns_forwarders_t));
|
||||
return (result);
|
||||
|
|
|
|||
Loading…
Reference in a new issue