Merge from HEAD:
authorRichard Levitte <levitte@openssl.org>
Fri, 19 Mar 2004 00:20:12 +0000 (00:20 +0000)
committerRichard Levitte <levitte@openssl.org>
Fri, 19 Mar 2004 00:20:12 +0000 (00:20 +0000)
2003-04-03 22:03  levitte

* apps/apps.c (1.70): Don't try to free NULL values...

Notified by "Steven Reddie" <smr@essemer.com.au>

apps/apps.c

index 93a665e788a33c7f06f099dee1ea84a09ce4b046..1a7ca62236aad00b00d68a15e6540ebee689f68f 100644 (file)
@@ -1970,6 +1970,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);
+               }
        }