Added missing free when xx fail