if (w->current_image != WIMLIB_NO_IMAGE) {
imd = wim_get_current_image_metadata(w);
if (!imd->modified) {
+ wimlib_assert(list_empty(&imd->unhashed_streams));
DEBUG("Freeing image %u", w->current_image);
destroy_image_metadata(imd, NULL, false);
}
free_lookup_table_entry(imd->metadata_lte);
imd->metadata_lte = NULL;
}
+ if (!table) {
+ struct wim_lookup_table_entry *lte, *tmp;
+ list_for_each_entry_safe(lte, tmp, &imd->unhashed_streams, unhashed_list)
+ free_lookup_table_entry(lte);
+ }
INIT_LIST_HEAD(&imd->unhashed_streams);
INIT_LIST_HEAD(&imd->inode_list);
}