lib/krb5: fallback_get_hosts free addrinfo if gTLD collision or error
commitf466b43975f77ee298ff892f57c18b23fb8d28fc
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 17 Jan 2022 00:50:40 +0000 (16 19:50 -0500)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 17 Jan 2022 00:50:40 +0000 (16 19:50 -0500)
tree7917f0a78009171567810b7716fd0b361b90b6d5
parent9c27eaa0794b24c075578e1581edc11b5471f218
lib/krb5: fallback_get_hosts free addrinfo if gTLD collision or error

If getaddrinfo() succeeds and returns the gTLD name collision
address the result is ignored but the allocated addrinfo was not
freed.

If allocation of the krb5_krbhst_info structure fails the addrinfo
would also be leaked.

Change-Id: I94111e081cba9548f57ad7b7e7cbea3faab7502c
lib/krb5/krbhst.c