Fix exit module, releasing the right pointer to the buffer.