(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;
|
struct dns_reply *r;
|
||||||
|
|
||||||
r = dns_lookup(instance, "aaaa");
|
r = dns_lookup(instance, "aaaa");
|
||||||
if (r && r->head && r->head->type == T_AAAA) {
|
if (r) {
|
||||||
|
if (r->head && r->head->type == T_AAAA) {
|
||||||
inst = strdup(r->head->domain);
|
inst = strdup(r->head->domain);
|
||||||
dns_free_data(r);
|
dns_free_data(r);
|
||||||
passed = TRUE;
|
passed = TRUE;
|
||||||
|
}
|
||||||
|
dns_free_data(r);
|
||||||
} else {
|
} else {
|
||||||
r = dns_lookup(instance, "a");
|
r = dns_lookup(instance, "a");
|
||||||
if(r && r->head && r->head->type == T_A) {
|
if (r) {
|
||||||
|
if(r->head && r->head->type == T_A) {
|
||||||
inst = strdup(r->head->domain);
|
inst = strdup(r->head->domain);
|
||||||
dns_free_data(r);
|
|
||||||
passed = TRUE;
|
passed = TRUE;
|
||||||
}
|
}
|
||||||
|
dns_free_data(r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
struct addrinfo hints, *ai;
|
struct addrinfo hints, *ai;
|
||||||
|
Reference in New Issue
Block a user