Close the FD if we can't fdopen it.  Found by codesonar
Close the FD if we can't fdopen it.  Found by codesonar