diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-11-17 11:55:52 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-11-17 12:01:30 -0500 |
commit | 2f086888b14be3998421b29bfc81d037b8073202 (patch) | |
tree | 93184bf0a071011fb3aa01dfb9cdf11e365fe172 /src/common/crypto_ed25519.h | |
parent | 94db8f32e46925c3a64def751e5d2efbddbdf417 (diff) | |
download | tor-2f086888b14be3998421b29bfc81d037b8073202.tar.gz tor-2f086888b14be3998421b29bfc81d037b8073202.zip |
Make all the crypto free() functions macros that clear their targets
Diffstat (limited to 'src/common/crypto_ed25519.h')
-rw-r--r-- | src/common/crypto_ed25519.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/crypto_ed25519.h b/src/common/crypto_ed25519.h index 8d13a487d6..64ccc470ea 100644 --- a/src/common/crypto_ed25519.h +++ b/src/common/crypto_ed25519.h @@ -7,6 +7,7 @@ #include "testsupport.h" #include "torint.h" #include "crypto_curve25519.h" +#include "util.h" #define ED25519_PUBKEY_LEN 32 #define ED25519_SECKEY_LEN 64 @@ -117,7 +118,8 @@ int ed25519_pubkey_read_from_file(ed25519_public_key_t *pubkey_out, char **tag_out, const char *filename); -void ed25519_keypair_free(ed25519_keypair_t *kp); +void ed25519_keypair_free_(ed25519_keypair_t *kp); +#define ed25519_keypair_free(kp) FREE_AND_NULL(ed25519_keypair, (kp)) int ed25519_pubkey_eq(const ed25519_public_key_t *key1, const ed25519_public_key_t *key2); |