diff options
Diffstat (limited to 'src/lib/libssl/src/crypto/bn/bn_rand.c')
-rw-r--r-- | src/lib/libssl/src/crypto/bn/bn_rand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libssl/src/crypto/bn/bn_rand.c b/src/lib/libssl/src/crypto/bn/bn_rand.c index 5cbb1f33c1..baa62d584c 100644 --- a/src/lib/libssl/src/crypto/bn/bn_rand.c +++ b/src/lib/libssl/src/crypto/bn/bn_rand.c | |||
@@ -130,7 +130,7 @@ static int bnrand(int pseudorand, BIGNUM *rnd, int bits, int top, int bottom) | |||
130 | bit=(bits-1)%8; | 130 | bit=(bits-1)%8; |
131 | mask=0xff<<(bit+1); | 131 | mask=0xff<<(bit+1); |
132 | 132 | ||
133 | buf=(unsigned char *)OPENSSL_malloc(bytes); | 133 | buf=(unsigned char *)malloc(bytes); |
134 | if (buf == NULL) | 134 | if (buf == NULL) |
135 | { | 135 | { |
136 | BNerr(BN_F_BNRAND,ERR_R_MALLOC_FAILURE); | 136 | BNerr(BN_F_BNRAND,ERR_R_MALLOC_FAILURE); |
@@ -199,7 +199,7 @@ err: | |||
199 | if (buf != NULL) | 199 | if (buf != NULL) |
200 | { | 200 | { |
201 | OPENSSL_cleanse(buf,bytes); | 201 | OPENSSL_cleanse(buf,bytes); |
202 | OPENSSL_free(buf); | 202 | free(buf); |
203 | } | 203 | } |
204 | bn_check_top(rnd); | 204 | bn_check_top(rnd); |
205 | return(ret); | 205 | return(ret); |