diff options
author | Richard Levitte <levitte@openssl.org> | 2017-10-24 13:39:04 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-10-24 20:52:12 +0200 |
commit | 03996c19c30575c48b254f10625d24f86058605b (patch) | |
tree | 0c9596ed8a0d4908cd160f9a5442eb438a367c99 /crypto/asn1/asn1_locl.h | |
parent | 4ce8bebcca90a1f8a3347be29df7a501043d4464 (diff) |
asn1_item_embed_new(): don't free an embedded item
The previous change with this intention didn't quite do it. An
embedded item must not be freed itself, but might potentially contain
non-embedded elements, which must be freed.
So instead of calling ASN1_item_ex_free(), where we can't pass the
embed flag, we call asn1_item_embed_free() directly.
This changes asn1_item_embed_free() from being a static function to
being a private non-static function.
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4579)
Diffstat (limited to 'crypto/asn1/asn1_locl.h')
-rw-r--r-- | crypto/asn1/asn1_locl.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/asn1/asn1_locl.h b/crypto/asn1/asn1_locl.h index 35cbd8d512..cec141721b 100644 --- a/crypto/asn1/asn1_locl.h +++ b/crypto/asn1/asn1_locl.h @@ -63,6 +63,7 @@ int asn1_enc_restore(int *len, unsigned char **out, ASN1_VALUE **pval, int asn1_enc_save(ASN1_VALUE **pval, const unsigned char *in, int inlen, const ASN1_ITEM *it); +void asn1_item_embed_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed); void asn1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed); void asn1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); |