asn1_item_embed_new(): if locking failed, don't call asn1_item_embed_free()
authorRichard Levitte <levitte@openssl.org>
Tue, 24 Oct 2017 16:32:22 +0000 (18:32 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 24 Oct 2017 18:52:12 +0000 (20:52 +0200)
commitfe6fcd31546db1ab019e55edd15c953c5b358559
tree00c960a05e3f1645bd79dc8c5312dc4b0fcc16d5
parent03996c19c30575c48b254f10625d24f86058605b
asn1_item_embed_new(): if locking failed, don't call asn1_item_embed_free()

asn1_item_embed_free() will try unlocking and fail in this case, and
since the new item was just allocated on the heap, free it directly
with OPENSSL_free() instead.

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de>
(Merged from https://github.com/openssl/openssl/pull/4579)
crypto/asn1/tasn_new.c