Move more comments that confuse indent
[openssl.git] / crypto / x509 / by_dir.c
index c6602dae4f58b88416a6d2cdbcbb4ab7d0868eaf..23ef0950a792e0e9018345531eddb8016742e69f 100644 (file)
@@ -444,6 +444,13 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
                        if (!hent)
                                {
                                hent = OPENSSL_malloc(sizeof(BY_DIR_HASH));
+                               if (hent == NULL)
+                                       {
+                                       CRYPTO_w_unlock(CRYPTO_LOCK_X509_STORE);
+                                       X509err(X509_F_GET_CERT_BY_SUBJECT,ERR_R_MALLOC_FAILURE);
+                                       ok = 0;
+                                       goto finish;
+                                       }
                                hent->hash = h;
                                hent->suffix = k;
                                if (!sk_BY_DIR_HASH_push(ent->hashes, hent))
@@ -469,7 +476,7 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
                        /* If we were going to up the reference count,
                         * we would need to do it on a perl 'type'
                         * basis */
-       /*              CRYPTO_add(&tmp->data.x509->references,1,
+       /*-             CRYPTO_add(&tmp->data.x509->references,1,
                                CRYPTO_LOCK_X509);*/
                        goto finish;
                        }