EC_POINT_hex2point: forget to free pt

Reviewed-by: Paul Dale <pauli@openssl.org>
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/17276)
This commit is contained in:
Peiwei Hu 2021-12-15 14:53:53 +08:00 committed by Tomas Mraz
parent e8b597f331
commit dd2fcc1f7c

View File

@ -68,7 +68,7 @@ EC_POINT *EC_POINT_hex2point(const EC_GROUP *group,
len = strlen(hex) / 2;
oct_buf = OPENSSL_malloc(len);
if (oct_buf == NULL)
return NULL;
goto err;
if (!OPENSSL_hexstr2buf_ex(oct_buf, len, &oct_buf_len, hex, '\0')
|| !EC_POINT_oct2point(group, pt, oct_buf, oct_buf_len, ctx))