Fix some file descriptor leaks
Downstream in RHEL, a couple of customers were hitting an issue where large scale XDMCP deployments would eventually topple over due to a file descriptor leak in the GDM process.
After a little debugging I found a few different bugs that all indirectly lead to the file descriptor leaks.