history: forgot freeing some pointers