Bugzilla #49060: File Descriptor leak in AFP renderer Patch by Peter Hancock, applied with minor style modifications