asn1_item_embed_new(): don't free an embedded item
authorRichard Levitte <levitte@openssl.org>
Tue, 24 Oct 2017 11:42:41 +0000 (13:42 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 24 Oct 2017 11:42:41 +0000 (13:42 +0200)
commit65d414434aeecd5aa86a46adbfbcb59b4344503a
tree3bb424ca7e8e1a4061fe5e9a41957b170ee99793
parentdeee898ef94a176a22fce3b9effc957cb75bb535
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
combine 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/4578)
crypto/asn1/asn1_int.h [new file with mode: 0644]
crypto/asn1/tasn_fre.c
crypto/asn1/tasn_new.c