diff options
author | Dimitri Staessens <dimitri@ouroboros.rocks> | 2019-08-05 02:15:50 +0200 |
---|---|---|
committer | Sander Vrijders <sander@ouroboros.rocks> | 2019-08-09 19:43:27 +0200 |
commit | 8114ba43c09ebb45ee6e1c608f23e27577130ebf (patch) | |
tree | cc9743f7ddb747aba3ac0e65c128b30c6b1bc17a /src/lib/crypt.c | |
parent | 3339a629b41c50cca4232517b8249d55f462464d (diff) | |
download | ouroboros-8114ba43c09ebb45ee6e1c608f23e27577130ebf.tar.gz ouroboros-8114ba43c09ebb45ee6e1c608f23e27577130ebf.zip |
lib: Fix free in key derivation
The wrong pointer was being free'd in case of a derivation error.
Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks>
Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/lib/crypt.c')
-rw-r--r-- | src/lib/crypt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/crypt.c b/src/lib/crypt.c index 94f1b50e..c9129a61 100644 --- a/src/lib/crypt.c +++ b/src/lib/crypt.c @@ -83,7 +83,7 @@ static int __openssl_ecdh_derive_secret(EVP_PKEY * kp, return 0; fail_derive: - OPENSSL_free(s); + OPENSSL_free(secret); fail_ctx: EVP_PKEY_CTX_free(ctx); fail_new: |