Allow NULL for some _free routines.
[openssl.git] / crypto / txt_db / txt_db.c
index a08f346af6771f4bb9cefdc07344b2c7a6a77546..a00560dcbd994bf988d4e32f53a64932b1cdeb5c 100644 (file)
@@ -284,6 +284,8 @@ void TXT_DB_free(TXT_DB *db)
     int i, n;
     char **p, *max;
 
+    if (db == NULL)
+        return;
     if (db->index != NULL) {
         for (i = db->num_fields - 1; i >= 0; i--)
             lh_OPENSSL_STRING_free(db->index[i]);