medified memory leak & double free