diff options
author | Bernd Edlinger <bernd.edlinger@hotmail.de> | 2024-01-09 15:05:30 +0100 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-01-10 17:59:53 +0100 |
commit | 398011848468c7e8e481b295f7904afc30934217 (patch) | |
tree | ac4d692c31f129e8ef5247ce3b1b254a36f0b7f2 /crypto | |
parent | 0151e772195fc03cce0f12e5e266e51dc15243a0 (diff) |
Fix a similar memory leak in SXNET_add_id_INTEGER
Even in the good case there was memory leak here.
Add a simple test case to have at least some test coverage.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23234)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/x509/v3_sxnet.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/x509/v3_sxnet.c b/crypto/x509/v3_sxnet.c index b9ddfe3244..74209d3e3f 100644 --- a/crypto/x509/v3_sxnet.c +++ b/crypto/x509/v3_sxnet.c @@ -204,6 +204,7 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user, ERR_raise(ERR_LIB_X509V3, ERR_R_CRYPTO_LIB); goto err; } + ASN1_INTEGER_free(id->zone); id->zone = zone; *psx = sx; return 1; |