mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-03 12:11:33 +01:00
dns: Fix memory use-after-free.
* dirmngr/dns.c (dns_res_stub): Fix RESCONF usage. -- Note that this is dead code. It is for making a static analyzer happy. Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
parent
f58d441bee
commit
cc0d53905c
@ -8301,8 +8301,14 @@ struct dns_resolver *dns_res_stub(const struct dns_options *opts, int *error) {
|
||||
if (!(hints = dns_hints_local(resconf, error)))
|
||||
goto epilog;
|
||||
|
||||
/* RESCONF is closed by dns_hints_local, so, get it again. */
|
||||
if (!(resconf = dns_resconf_local(error)))
|
||||
goto epilog;
|
||||
|
||||
if (!(res = dns_res_open(resconf, hosts, hints, NULL, opts, error)))
|
||||
goto epilog;
|
||||
else
|
||||
return res;
|
||||
|
||||
epilog:
|
||||
dns_resconf_close(resconf);
|
||||
|
Loading…
x
Reference in New Issue
Block a user