After a call to one of these functions, Fa hostlist is a NULL terminated list of strings, pointing to the requested Kerberos hosts. These should be freed with Fn krb5_free_krbhst when done with.
char **hosts, **p;
krb5_get_krbhst(context, "MY.REALM", &hosts);
for(p = hosts; *p; p++)
printf("%s\n", *p);
krb5_free_krbhst(context, hosts);