Fix an allocation/free error