Fix leafhash resource leak, CID 1536899

This commit is contained in:
olszomal 2023-03-27 09:52:18 +02:00 committed by Michał Trojnara
parent 4199310cdf
commit d2f1b9c035

View File

@ -1328,6 +1328,7 @@ static int verify_leaf_hash(X509 *cert, const char *leafhash)
char *hash = strchr(mdid, ':');
if (hash == NULL) {
printf("\nUnable to parse -require-leaf-hash parameter: %s\n", leafhash);
OPENSSL_free(mdid);
return 0; /* FAILED */
}
*hash++ = '\0';