Commit 15a4d92d authored by Tim Ruehsen's avatar Tim Ruehsen Committed by Niels Möller

Additional deallocation fixes.

parent dc214c3a
2012-09-19 Niels Möller <nisse@lysator.liu.se>
From Tim Rühsen:
* examples/rsa-encrypt.c (main): Added missing mpz_clear.
* examples/rsa-keygen.c (main): Added missing deallocation.
* testsuite/meta-hash-test.c (test_main): Validate
NETTLE_MAX_HASH_DIGEST_SIZE.
......
......@@ -253,11 +253,13 @@ main(int argc, char **argv)
}
write_bignum(stdout, x);
mpz_clear (x);
if (!process_file(&ctx,
stdin, stdout))
return EXIT_FAILURE;
rsa_public_key_clear(&key);
return EXIT_SUCCESS;
......
......@@ -160,5 +160,11 @@ main(int argc, char **argv)
return EXIT_FAILURE;
}
nettle_buffer_clear(&priv_buffer);
nettle_buffer_clear(&pub_buffer);
rsa_public_key_clear(&pub);
rsa_private_key_clear(&priv);
free (pub_name);
return EXIT_SUCCESS;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment