code:gauss:c: Fixed memory leak

Confirmed with valgrind
code:gauss:pthread: Fixed memory leak

Confirmed with valgrind.  The responsibilities over who should free the
memory are rather unclear in that case.  There may be a more beautifull
fix for it.
Merge pull request #2 from rnestler/master

Fixing memory leaks