Fix a few if(, for(, while( inside code.
[openssl.git] / crypto / asn1 / tasn_new.c
index 455a88ab62824d6a8317f980b04c97db7ace5f2f..897120d26c67b11ba121fafda5d10e042b045aaf 100644 (file)
@@ -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);