aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/asn1/tasn_new.c
diff options
context:
space:
mode:
authorFdaSilvaYY <fdasilvayy@gmail.com>2016-05-29 14:32:23 +0200
committerMatt Caswell <matt@openssl.org>2016-06-23 14:00:47 +0100
commit687b48685931638ca5fca2a7d5e13516ad40ea4b (patch)
treefa20991db59b7747eb23f4b68d6d37c4fe687140 /crypto/asn1/tasn_new.c
parentb58614d7f5f98571b2c0bb2fb3df48f4b48a7e92 (diff)
downloadopenssl-687b48685931638ca5fca2a7d5e13516ad40ea4b.tar.gz
Rework error handling from asn1_do_lock method.
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/asn1/tasn_new.c')
-rw-r--r--crypto/asn1/tasn_new.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/asn1/tasn_new.c b/crypto/asn1/tasn_new.c
index 455a88ab62..897120d26c 100644
--- a/crypto/asn1/tasn_new.c
+++ b/crypto/asn1/tasn_new.c
@@ -123,7 +123,9 @@ int asn1_item_embed_new(ASN1_VALUE **pval, const ASN1_ITEM *it, int embed)
if (*pval == NULL)
goto memerr;
}
- asn1_do_lock(pval, 0, it);
+ /* 0 : init. lock */
+ if (asn1_do_lock(pval, 0, it) < 0)
+ goto memerr;
asn1_enc_init(pval, it);
for (i = 0, tt = it->templates; i < it->tcount; tt++, i++) {
pseqval = asn1_get_field_ptr(pval, tt);