fix 2 small memory leaks Valgrind found