Can you attach your command to check the memory? You can also use the valgrind to check the memory leak.