Make Valgrind happy

This version compiles on Solaris x86 and SPARC and does not SEGV.

On Solaris, there will be a 40 bytes of reachable memory on exit.

On other platforms all reachable memory will be freed.

Under Linux (Ubuntu 12.04) "valgrind --leak-check=full cppcheck" says:

 HEAP SUMMARY:
    in use at exit: 0 bytes in 0 blocks
  total heap usage: 461 allocs, 461 frees, 41,015 bytes allocated

 All heap blocks were freed -- no leaks are possible