]> wimlib.net Git - wimlib/blobdiff - src/lookup_table.c
Partial fixes and comments
[wimlib] / src / lookup_table.c
index e6b8fb2cbafcc86ee033b9d4dd5b579e0b9886d3..0c6a55fcccb9463c8092fda7269ef09b048745a8 100644 (file)
@@ -76,7 +76,9 @@ void free_lookup_table_entry(struct lookup_table_entry *lte)
        if (lte) {
                if (lte->staging_list.next)
                        list_del(&lte->staging_list);
-               FREE(lte->file_on_disk);
+               if (lte->resource_location != RESOURCE_IN_WIM &&
+                   lte->resource_location != RESOURCE_NONEXISTENT)
+                       FREE(lte->file_on_disk);
                FREE(lte);
        }
 }
@@ -273,7 +275,7 @@ int zero_out_refcnts(struct lookup_table_entry *entry, void *ignore)
        return 0;
 }
 
-void print_lookup_table_entry(struct lookup_table_entry *lte)
+void print_lookup_table_entry(const struct lookup_table_entry *lte)
 {
        if (!lte) {
                putchar('\n');