(krb5_425_conv_principal_ext2): remove memory leak in case of weird

formated dns replys.


git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17040 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Love Hörnquist Åstrand
2006-04-10 10:02:48 +00:00
parent c5dd980dba
commit 55178a0d79

View File

@@ -750,17 +750,22 @@ krb5_425_conv_principal_ext2(krb5_context context,
struct dns_reply *r;
r = dns_lookup(instance, "aaaa");
if (r && r->head && r->head->type == T_AAAA) {
inst = strdup(r->head->domain);
dns_free_data(r);
passed = TRUE;
} else {
r = dns_lookup(instance, "a");
if(r && r->head && r->head->type == T_A) {
if (r) {
if (r->head && r->head->type == T_AAAA) {
inst = strdup(r->head->domain);
dns_free_data(r);
passed = TRUE;
}
dns_free_data(r);
} else {
r = dns_lookup(instance, "a");
if (r) {
if(r->head && r->head->type == T_A) {
inst = strdup(r->head->domain);
passed = TRUE;
}
dns_free_data(r);
}
}
#else
struct addrinfo hints, *ai;