(krb5_sname_to_principal): handle ai_canonname not being set
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@7608 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -888,6 +888,9 @@ krb5_sname_to_principal (krb5_context context,
|
||||
if (error == 0) {
|
||||
host = strdup (res->ai_canonname);
|
||||
freeaddrinfo (res);
|
||||
} else if (res->ai_canonname == NULL) {
|
||||
freeaddrinfo (res);
|
||||
host = strdup (hostname);
|
||||
} else {
|
||||
host = strdup (hostname);
|
||||
}
|
||||
|
Reference in New Issue
Block a user