asn1/asn_moid.c: overhaul do_create.
authorAndy Polyakov <appro@openssl.org>
Fri, 17 Aug 2018 21:04:03 +0000 (23:04 +0200)
committerAndy Polyakov <appro@openssl.org>
Wed, 22 Aug 2018 19:35:27 +0000 (21:35 +0200)
commit19934970ac8534cd19eb3f64299e5731d97a7a80
treed2ec3880676695a72386253d2354a40df601d450
parentf112dc82a44729d3f7c853c01047f6bfeb8f90ce
asn1/asn_moid.c: overhaul do_create.

Original could allocate nid and then bail out on malloc failure. Instead
allocate first *then* attempt to create object.

Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/6998)
crypto/asn1/asn_moid.c