diff options
Diffstat (limited to 'lib/libcrypto/ec/ec_print.c')
-rw-r--r-- | lib/libcrypto/ec/ec_print.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/lib/libcrypto/ec/ec_print.c b/lib/libcrypto/ec/ec_print.c index f7c8a303aca..1655332c3c5 100644 --- a/lib/libcrypto/ec/ec_print.c +++ b/lib/libcrypto/ec/ec_print.c @@ -70,18 +70,18 @@ BIGNUM *EC_POINT_point2bn(const EC_GROUP *group, if (buf_len == 0) return NULL; - if ((buf = OPENSSL_malloc(buf_len)) == NULL) + if ((buf = malloc(buf_len)) == NULL) return NULL; if (!EC_POINT_point2oct(group, point, form, buf, buf_len, ctx)) { - OPENSSL_free(buf); + free(buf); return NULL; } ret = BN_bin2bn(buf, buf_len, ret); - OPENSSL_free(buf); + free(buf); return ret; } @@ -96,13 +96,13 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, EC_POINT *ret; if ((buf_len = BN_num_bytes(bn)) == 0) return NULL; - buf = OPENSSL_malloc(buf_len); + buf = malloc(buf_len); if (buf == NULL) return NULL; if (!BN_bn2bin(bn, buf)) { - OPENSSL_free(buf); + free(buf); return NULL; } @@ -110,7 +110,7 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, { if ((ret = EC_POINT_new(group)) == NULL) { - OPENSSL_free(buf); + free(buf); return NULL; } } @@ -121,17 +121,17 @@ EC_POINT *EC_POINT_bn2point(const EC_GROUP *group, { if (point == NULL) EC_POINT_clear_free(ret); - OPENSSL_free(buf); + free(buf); return NULL; } - OPENSSL_free(buf); + free(buf); return ret; } static const char *HEX_DIGITS = "0123456789ABCDEF"; -/* the return value must be freed (using OPENSSL_free()) */ +/* the return value must be freed (using free()) */ char *EC_POINT_point2hex(const EC_GROUP *group, const EC_POINT *point, point_conversion_form_t form, @@ -146,19 +146,19 @@ char *EC_POINT_point2hex(const EC_GROUP *group, if (buf_len == 0) return NULL; - if ((buf = OPENSSL_malloc(buf_len)) == NULL) + if ((buf = malloc(buf_len)) == NULL) return NULL; if (!EC_POINT_point2oct(group, point, form, buf, buf_len, ctx)) { - OPENSSL_free(buf); + free(buf); return NULL; } - ret = (char *)OPENSSL_malloc(buf_len*2+2); + ret = (char *)malloc(buf_len*2+2); if (ret == NULL) { - OPENSSL_free(buf); + free(buf); return NULL; } p = ret; @@ -171,7 +171,7 @@ char *EC_POINT_point2hex(const EC_GROUP *group, } *p='\0'; - OPENSSL_free(buf); + free(buf); return ret; } |