Fix Coverity warning:

>>>     CID 1192605:  Resource leak  (RESOURCE_LEAK)
>>>     Handle variable "fd" going out of scope leaks the handle.