free should be local variable