[openssl-commits] [openssl] OpenSSL_1_1_0-stable update

Matt Caswell matt at openssl.org
Tue Mar 21 10:24:18 UTC 2017


The branch OpenSSL_1_1_0-stable has been updated
       via  72afe2fdc7ae856155aea0efb8a33ad8bc128233 (commit)
      from  256315dee11b187bc0390d75082f0231c4263eac (commit)


- Log -----------------------------------------------------------------
commit 72afe2fdc7ae856155aea0efb8a33ad8bc128233
Author: David Benjamin <davidben at google.com>
Date:   Tue Mar 21 00:27:35 2017 -0400

    Remove duplicate X509_OBJECT free function.
    
    These two functions do the same thing.
    
    Reviewed-by: Richard Levitte <levitte at openssl.org>
    Reviewed-by: Matt Caswell <matt at openssl.org>
    (Merged from https://github.com/openssl/openssl/pull/3001)
    (cherry picked from commit b6ef12c4baa3a2c1ff0e3ac71270588dfcfe8cbd)

-----------------------------------------------------------------------

Summary of changes:
 crypto/x509/x509_lu.c | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)

diff --git a/crypto/x509/x509_lu.c b/crypto/x509/x509_lu.c
index 952cbfb..90f2352 100644
--- a/crypto/x509/x509_lu.c
+++ b/crypto/x509/x509_lu.c
@@ -172,21 +172,6 @@ err:
     return NULL;
 }
 
-static void cleanup(X509_OBJECT *a)
-{
-    if (!a)
-        return;
-    if (a->type == X509_LU_X509) {
-        X509_free(a->data.x509);
-    } else if (a->type == X509_LU_CRL) {
-        X509_CRL_free(a->data.crl);
-    } else {
-        /* abort(); */
-    }
-
-    OPENSSL_free(a);
-}
-
 void X509_STORE_free(X509_STORE *vfy)
 {
     int i;
@@ -209,7 +194,7 @@ void X509_STORE_free(X509_STORE *vfy)
         X509_LOOKUP_free(lu);
     }
     sk_X509_LOOKUP_free(sk);
-    sk_X509_OBJECT_pop_free(vfy->objs, cleanup);
+    sk_X509_OBJECT_pop_free(vfy->objs, X509_OBJECT_free);
 
     CRYPTO_free_ex_data(CRYPTO_EX_INDEX_X509_STORE, vfy, &vfy->ex_data);
     X509_VERIFY_PARAM_free(vfy->param);


More information about the openssl-commits mailing list