s3:registry: Avoid a double-free in reg_perfcount