removing a couple of memory leaks

getting the number of valgrind  error messages for test_eressea down by 85%