u64 offset1 = imd1->metadata_lte->resource_entry.offset;
u64 offset2 = imd2->metadata_lte->resource_entry.offset;
if (offset1 < offset2)
u64 offset1 = imd1->metadata_lte->resource_entry.offset;
u64 offset2 = imd2->metadata_lte->resource_entry.offset;
if (offset1 < offset2)
if (w->hdr.image_count != 0) {
w->image_metadata = CALLOC(w->hdr.image_count,
if (w->hdr.image_count != 0) {
w->image_metadata = CALLOC(w->hdr.image_count,
if (!w->image_metadata) {
ERROR("Failed to allocate memory for %u image metadata structures",
if (!w->image_metadata) {
ERROR("Failed to allocate memory for %u image metadata structures",
* file, rather than their order in the lookup table, which is random
* because of hashing. */
qsort(w->image_metadata, w->current_image,
* file, rather than their order in the lookup table, which is random
* because of hashing. */
qsort(w->image_metadata, w->current_image,
struct wim_lookup_table *table)
{
free_dentry_tree(imd->root_dentry, table);
struct wim_lookup_table *table)
{
free_dentry_tree(imd->root_dentry, table);