Allow NULL for some _free routines.
[openssl.git] / crypto / x509 / x509_lu.c
index d69cedb..7b33eba 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)