fix memory-leak (the only and last one as it seems); add files for repeating the memory-leak check