Fixed a free error.
Changed the free interfaces.