You've found a use after free bug when fqdn is used with sssd. It shouldn't be stashing shost and host in the handle like that. This was added to support the hostname setting in sssd.conf but it will need to be handled differently. - todd