Don't try to free NULL values...
authorRichard Levitte <levitte@openssl.org>
Thu, 3 Apr 2003 20:03:23 +0000 (20:03 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 3 Apr 2003 20:03:23 +0000 (20:03 +0000)
apps/apps.c

index bdd14dd..6092c39 100644 (file)
@@ -1873,6 +1873,9 @@ int rotate_index(char *dbfile, char *new_suffix, char *old_suffix)
 
 void free_index(CA_DB *db)
        {
-       TXT_DB_free(db->db);
-       OPENSSL_free(db);
+       if (db)
+               {
+               if (db->db) TXT_DB_free(db->db);
+               OPENSSL_free(db);
+               }
        }