]> wimlib.net Git - wimlib/commitdiff
free_lookup_table(): Simplify
authorEric Biggers <ebiggers3@gmail.com>
Tue, 13 May 2014 15:49:56 +0000 (10:49 -0500)
committerEric Biggers <ebiggers3@gmail.com>
Tue, 13 May 2014 15:49:56 +0000 (10:49 -0500)
src/lookup_table.c

index 3c7d887fff45bac67b7ba2e55de1c1d3df1f156d..9c198d5b4da3f13f9baf5ef7dcf576f4ab374bb3 100644 (file)
@@ -94,17 +94,11 @@ do_free_lookup_table_entry(struct wim_lookup_table_entry *entry, void *ignore)
 void
 free_lookup_table(struct wim_lookup_table *table)
 {
 void
 free_lookup_table(struct wim_lookup_table *table)
 {
-       DEBUG("Freeing lookup table.");
-       if (table == NULL)
-               return;
-
-       if (table->array) {
-               for_lookup_table_entry(table,
-                                      do_free_lookup_table_entry,
-                                      NULL);
+       if (table) {
+               for_lookup_table_entry(table, do_free_lookup_table_entry, NULL);
                FREE(table->array);
                FREE(table->array);
+               FREE(table);
        }
        }
-       FREE(table);
 }
 
 struct wim_lookup_table_entry *
 }
 
 struct wim_lookup_table_entry *