Fix a possible memory leak in sxnet_v2i
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 8 Jan 2024 14:31:32 +0000 (15:31 +0100)
committerTomas Mraz <tomas@openssl.org>
Wed, 10 Jan 2024 16:59:53 +0000 (17:59 +0100)
commit0151e772195fc03cce0f12e5e266e51dc15243a0
tree578b00cbf37b2c2a6ec05c41052d9330ffb77b8d
parent1d1ca79fe35dbe5c05faed5a2ef8c4de9c5adc49
Fix a possible memory leak in sxnet_v2i

When a subsequent call to SXNET_add_id_asc fails
e.g. because user is a string larger than 64 char
or the zone is a duplicate zone id,
or the zone is not an integer,
a memory leak may be the result.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23234)
crypto/x509/v3_sxnet.c