[#2212] CID37580:

in case of a negative file descriptor, do not close the file