EC_POINT_hex2point: forget to free pt
authorPeiwei Hu <jlu.hpw@foxmail.com>
Wed, 15 Dec 2021 06:53:53 +0000 (14:53 +0800)
committerTomas Mraz <tomas@openssl.org>
Thu, 16 Dec 2021 11:42:16 +0000 (12:42 +0100)
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)

(cherry picked from commit dd2fcc1f7c44c5fb5aa2d33aecdc699c7018ce01)

crypto/ec/ec_print.c

index d791e15b4839ddf74956a5f4d39444696378774e..ffe112052fbd620912f56958067dfac1db191975 100644 (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))