removed free-ing of the exit function