Fix memory leak detected by valgrind (#1250)

This commit is contained in:
HY Chang(splasky) 2022-07-18 03:35:35 +08:00 committed by GitHub
parent e88cc366b5
commit 664c6f331d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,6 +32,7 @@ int main(void) {
printf(" length-ciphertext: %zu\n", kem->length_ciphertext);
printf(" length-secret-key: %zu\n", kem->length_secret_key);
printf(" length-shared-secret: %zu\n", kem->length_shared_secret);
OQS_KEM_free(kem);
}
// iterate through signature schemes and print info
@ -50,6 +51,7 @@ int main(void) {
printf(" length-public-key: %zu\n", sig->length_public_key);
printf(" length-secret-key: %zu\n", sig->length_secret_key);
printf(" length-signature: %zu\n", sig->length_signature);
OQS_SIG_free(sig);
}
}