diff options
author | Daniel Borkmann <dborkman@redhat.com> | 2013-06-15 20:15:40 +0200 |
---|---|---|
committer | Daniel Borkmann <dborkman@redhat.com> | 2013-06-15 20:15:40 +0200 |
commit | d9b5259582a6073d1c2bada8c3294c7550c7b678 (patch) | |
tree | e48c3bc7c9c21b1cc9f48f64bd5b279e735a765a | |
parent | bc41b879d5f8d2286f094d85222d0d40b90ace00 (diff) |
curve: free buffers in reverse order to allocation
First destroy spinlocks, then free the encryption and decryption
buffers.
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
-rw-r--r-- | curve.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -42,11 +42,11 @@ static void curve25519_init(struct curve25519_struct *curve) static void curve25519_destroy(struct curve25519_struct *curve) { - xzfree(curve->enc, curve->enc_size); - xzfree(curve->dec, curve->dec_size); - spinlock_destroy(&curve->enc_lock); spinlock_destroy(&curve->dec_lock); + + xzfree(curve->enc, curve->enc_size); + xzfree(curve->dec, curve->dec_size); } struct curve25519_struct *curve25519_tfm_alloc(void) |