Valgrind test with memory leak