Allow NULL for some _free routines.
[openssl.git] / crypto / x509 / x509_lu.c
index d69cedb72f8ec7cb5ea107b1d167cc1e1bde34d3..7b33ebad73b3fa01f587c1b568a52766773f3311 100644 (file)
@@ -178,6 +178,8 @@ void X509_STORE_free(X509_STORE *vfy)
     STACK_OF(X509_LOOKUP) *sk;
     X509_LOOKUP *lu;
 
+    if (vfy == NULL)
+        return;
     CRYPTO_DOWN_REF(&vfy->references, &i, vfy->lock);
     REF_PRINT_COUNT("X509_STORE", vfy);
     if (i > 0)