Resolver: fixed memory leak for the "ipv4=off" case.

This change partially reverts 2a77754cd9fe to properly free rn->query.

Found by Coverity (CID 1507244).
This commit is contained in:
Sergey Kandaurov 2022-07-14 21:26:54 +04:00
parent bcf1402445
commit ec2ecdd62b
1 changed files with 1 additions and 4 deletions

View File

@ -3684,10 +3684,7 @@ ngx_resolver_create_name_query(ngx_resolver_t *r, ngx_resolver_node_t *rn,
}
rn->qlen = (u_short) len;
if (r->ipv4) {
rn->query = p;
}
rn->query = p;
#if (NGX_HAVE_INET6)
if (r->ipv6) {