Always set errno to ENOMEM when returning 0 from malloc() or realloc().
Always set errno to ENOMEM when returning 0 from malloc() or realloc().

Approved by:	phk

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