diff options
author | Xiangyu Bu <xybu@users.noreply.github.com> | 2017-10-17 17:10:53 -0700 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-10-23 17:46:02 +0200 |
commit | 04761b557a53f026630dd5916b2b8522d94579db (patch) | |
tree | 13ce3c417fe967168ead93b620f71886def753f5 | |
parent | 590bbdfdf43b97abf8817f506f8ab46687d1eadd (diff) | |
download | openssl-04761b557a53f026630dd5916b2b8522d94579db.tar.gz |
Fix memory leak in GENERAL_NAME_set0_othername.
CLA: trivial
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4544)
-rw-r--r-- | crypto/x509v3/v3_genn.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/x509v3/v3_genn.c b/crypto/x509v3/v3_genn.c index 8d1199748c..85fc3fc246 100644 --- a/crypto/x509v3/v3_genn.c +++ b/crypto/x509v3/v3_genn.c @@ -181,6 +181,7 @@ int GENERAL_NAME_set0_othername(GENERAL_NAME *gen, oth = OTHERNAME_new(); if (oth == NULL) return 0; + ASN1_TYPE_free(oth->value); oth->type_id = oid; oth->value = value; GENERAL_NAME_set0_value(gen, GEN_OTHERNAME, oth); |