]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
cryptenroll: Remove faulty assert()
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Sun, 20 Oct 2024 14:31:23 +0000 (16:31 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 21 Oct 2024 15:24:14 +0000 (17:24 +0200)
We can break out of the preceeding for loop in certain scenarios
which would trigger the assert so let's drop it.

src/cryptenroll/cryptenroll-tpm2.c

index d58194fb85116bdc4e3ef62038cfeb6a7310188c..ca163ef3c2f8b901e02734add3eb8d83a2ccb223 100644 (file)
@@ -78,8 +78,6 @@ static int search_policy_hash(
                                         j++;
                                 }
 
-                                assert(j == n_policy_hash);
-
                                 if (match) /* Found entry with the exact same set of hashes */
                                         return keyslot;
                         }