perf tests: Fix memory leak in dso-data.c
[pandora-kernel.git] / tools / perf / tests / dso-data.c
index dffe055..9cc81a3 100644 (file)
@@ -35,6 +35,7 @@ static char *test_file(int size)
        if (size != write(fd, buf, size))
                templ = NULL;
 
+       free(buf);
        close(fd);
        return templ;
 }