Fixed a pinentry segfault (hopefully) during cleanup of the pinentry