(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:
@@ -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;
|
||||
|
Reference in New Issue
Block a user