- A call to close(2) might overwrite errno and thus give a wrong error message   on g_providername failure.
- A call to close(2) might overwrite errno and thus give a wrong error message
  on g_providername failure.

Suggested by:	pjd
Approved by:	pjd (mentor)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase