Prevent double-free after 8b5d30d43.