diff options
| author | beck <> | 2015-02-13 00:46:03 +0000 | 
|---|---|---|
| committer | beck <> | 2015-02-13 00:46:03 +0000 | 
| commit | 17f71011dbdc7843cd4ccd2adcf653f7affcbda4 (patch) | |
| tree | 5f02ad878b2fcdecc1e01b98a21f85fe6c491f65 /src | |
| parent | 0a89699049a6c09c89d27d27e4c02b4df2699998 (diff) | |
| download | openbsd-17f71011dbdc7843cd4ccd2adcf653f7affcbda4.tar.gz openbsd-17f71011dbdc7843cd4ccd2adcf653f7affcbda4.tar.bz2 openbsd-17f71011dbdc7843cd4ccd2adcf653f7affcbda4.zip | |
fix leaking of bn, coverity issue 105351
ok doug@
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libcrypto/ec/ecp_mont.c | 3 | ||||
| -rw-r--r-- | src/lib/libssl/src/crypto/ec/ecp_mont.c | 3 | 
2 files changed, 4 insertions, 2 deletions
| diff --git a/src/lib/libcrypto/ec/ecp_mont.c b/src/lib/libcrypto/ec/ecp_mont.c index af8014ed38..a3ad4e1ce9 100644 --- a/src/lib/libcrypto/ec/ecp_mont.c +++ b/src/lib/libcrypto/ec/ecp_mont.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecp_mont.c,v 1.9 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ecp_mont.c,v 1.10 2015/02/13 00:46:03 beck Exp $ */ | 
| 2 | /* | 2 | /* | 
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 
| 4 | */ | 4 | */ | 
| @@ -228,6 +228,7 @@ ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
| 228 | err: | 228 | err: | 
| 229 | BN_CTX_free(new_ctx); | 229 | BN_CTX_free(new_ctx); | 
| 230 | BN_MONT_CTX_free(mont); | 230 | BN_MONT_CTX_free(mont); | 
| 231 | BN_free(one); | ||
| 231 | return ret; | 232 | return ret; | 
| 232 | } | 233 | } | 
| 233 | 234 | ||
| diff --git a/src/lib/libssl/src/crypto/ec/ecp_mont.c b/src/lib/libssl/src/crypto/ec/ecp_mont.c index af8014ed38..a3ad4e1ce9 100644 --- a/src/lib/libssl/src/crypto/ec/ecp_mont.c +++ b/src/lib/libssl/src/crypto/ec/ecp_mont.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ecp_mont.c,v 1.9 2014/07/12 16:03:37 miod Exp $ */ | 1 | /* $OpenBSD: ecp_mont.c,v 1.10 2015/02/13 00:46:03 beck Exp $ */ | 
| 2 | /* | 2 | /* | 
| 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 3 | * Originally written by Bodo Moeller for the OpenSSL project. | 
| 4 | */ | 4 | */ | 
| @@ -228,6 +228,7 @@ ec_GFp_mont_group_set_curve(EC_GROUP *group, const BIGNUM *p, const BIGNUM *a, | |||
| 228 | err: | 228 | err: | 
| 229 | BN_CTX_free(new_ctx); | 229 | BN_CTX_free(new_ctx); | 
| 230 | BN_MONT_CTX_free(mont); | 230 | BN_MONT_CTX_free(mont); | 
| 231 | BN_free(one); | ||
| 231 | return ret; | 232 | return ret; | 
| 232 | } | 233 | } | 
| 233 | 234 | ||
