fixed makefile and a test for basic mem leak