Fixing the free in adams for valgrind clean