diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_exp.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_exp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_exp.c b/src/lib/libcrypto/bn/bn_exp.c index 2abf6fd678..2047e1cc3f 100644 --- a/src/lib/libcrypto/bn/bn_exp.c +++ b/src/lib/libcrypto/bn/bn_exp.c | |||
@@ -636,7 +636,7 @@ int BN_mod_exp_mont_consttime(BIGNUM *rr, const BIGNUM *a, const BIGNUM *p, | |||
636 | powerbufFree = alloca(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH); | 636 | powerbufFree = alloca(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH); |
637 | else | 637 | else |
638 | #endif | 638 | #endif |
639 | if ((powerbufFree=(unsigned char*)OPENSSL_malloc(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH)) == NULL) | 639 | if ((powerbufFree=(unsigned char*)malloc(powerbufLen+MOD_EXP_CTIME_MIN_CACHE_LINE_WIDTH)) == NULL) |
640 | goto err; | 640 | goto err; |
641 | 641 | ||
642 | powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree); | 642 | powerbuf = MOD_EXP_CTIME_ALIGN(powerbufFree); |
@@ -823,7 +823,7 @@ err: | |||
823 | if (powerbuf!=NULL) | 823 | if (powerbuf!=NULL) |
824 | { | 824 | { |
825 | OPENSSL_cleanse(powerbuf,powerbufLen); | 825 | OPENSSL_cleanse(powerbuf,powerbufLen); |
826 | if (powerbufFree) OPENSSL_free(powerbufFree); | 826 | if (powerbufFree) free(powerbufFree); |
827 | } | 827 | } |
828 | BN_CTX_end(ctx); | 828 | BN_CTX_end(ctx); |
829 | return(ret); | 829 | return(ret); |