Remove duplicate memory free