goto out_free;
}
w->lookup_table = table;
+ w->refcnts_ok = 1;
*w_ret = w;
return 0;
out_free:
int ret;
ret = can_modify_wim(wim);
- if (ret == 0 && !wim->all_images_verified)
- ret = wim_run_full_verifications(wim);
- return ret;
+ if (ret)
+ return ret;
+ if (!wim->refcnts_ok)
+ wim_recalculate_refcnts(wim);
+ return 0;
}
/* Frees the memory for the WIMStruct, including all internal memory; also