EC_POINT_point2buf() use OPENSSL_malloc() to allocate memory for 'point_bin', we should use OPENSSL_free() to release it, rather than free().
Signed-off-by: Zhiqi Song songzhiqi1@huawei.com --- src/uadk_pkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/uadk_pkey.c b/src/uadk_pkey.c index b24c196..35a2696 100644 --- a/src/uadk_pkey.c +++ b/src/uadk_pkey.c @@ -375,7 +375,7 @@ int uadk_ecc_set_public_key(handle_t sess, const EC_KEY *eckey) ret = UADK_DO_SOFT; }
- free(point_bin); + OPENSSL_free(point_bin);
return ret; }