imv-attestation: Fix memory leaks when creating functional components