diff options
Diffstat (limited to 'src/crypto/ecdh/ecdh.c')
-rw-r--r-- | src/crypto/ecdh/ecdh.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/crypto/ecdh/ecdh.c b/src/crypto/ecdh/ecdh.c index d4497f1..a011bab 100644 --- a/src/crypto/ecdh/ecdh.c +++ b/src/crypto/ecdh/ecdh.c @@ -145,13 +145,17 @@ int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, } err: - if (tmp) + if (tmp) { EC_POINT_free(tmp); - if (ctx) + } + if (ctx) { BN_CTX_end(ctx); - if (ctx) + } + if (ctx) { BN_CTX_free(ctx); - if (buf) + } + if (buf) { OPENSSL_free(buf); + } return ret; } |