mirror of
https://github.com/isc-projects/bind9.git
synced 2026-04-29 18:09:11 -04:00
free the allocated aliaslen array when freeing the alias name point array
This commit is contained in:
parent
88ed7381f1
commit
12e302d5c7
2 changed files with 6 additions and 2 deletions
|
|
@ -354,8 +354,10 @@ lwres_gabnresponse_free(lwres_context_t *ctx, lwres_gabnresponse_t **structp)
|
|||
gabn = *structp;
|
||||
*structp = NULL;
|
||||
|
||||
if (gabn->naliases > 0)
|
||||
if (gabn->naliases > 0) {
|
||||
CTXFREE(gabn->aliases, sizeof(char *) * gabn->naliases);
|
||||
CTXFREE(gabn->aliaslen, sizeof(isc_uint16_t) * gabn->naliases);
|
||||
}
|
||||
if (gabn->naddrs > 0)
|
||||
CTXFREE(gabn->addrs, sizeof(lwres_addr_t *) * gabn->naddrs);
|
||||
if (gabn->base != NULL)
|
||||
|
|
|
|||
|
|
@ -304,8 +304,10 @@ lwres_gnbaresponse_free(lwres_context_t *ctx, lwres_gnbaresponse_t **structp)
|
|||
gnba = *structp;
|
||||
*structp = NULL;
|
||||
|
||||
if (gnba->naliases > 0)
|
||||
if (gnba->naliases > 0) {
|
||||
CTXFREE(gnba->aliases, sizeof(char *) * gnba->naliases);
|
||||
CTXFREE(gnba->aliaslen, sizeof(isc_uint16_t) * gnba->naliases);
|
||||
}
|
||||
if (gnba->base != NULL)
|
||||
CTXFREE(gnba->base, gnba->baselen);
|
||||
CTXFREE(gnba, sizeof(lwres_gnbaresponse_t));
|
||||
|
|
|
|||
Loading…
Reference in a new issue