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 18:17:06 +0100 |
commit | e751c109d68602b75cc6b8e0f9f3a128354aaad5 (patch) | |
tree | dc1c66e1d9f1b9ebdcc7c269eaac83ef6c679390 /crypto | |
parent | 267ffc061ed03a06e7a6fe5d91449c5fed21d7bf (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)
(cherry picked from commit 398011848468c7e8e481b295f7904afc30934217)
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 56deece2fd..0ad2a3f939 100644 --- a/crypto/x509/v3_sxnet.c +++ b/crypto/x509/v3_sxnet.c @@ -196,6 +196,7 @@ int SXNET_add_id_INTEGER(SXNET **psx, ASN1_INTEGER *zone, const char *user, goto err; if (!sk_SXNETID_push(sx->ids, id)) goto err; + ASN1_INTEGER_free(id->zone); id->zone = zone; *psx = sx; return 1; |