+
+ DEBUG("Freeing WIMStruct (filename=\"%"TS"\", image_count=%u)",
+ wim->filename, wim->hdr.image_count);
+
+ while (!list_empty(&wim->subwims)) {
+ WIMStruct *subwim;
+
+ subwim = list_entry(wim->subwims.next, WIMStruct, subwim_node);
+ list_del(&subwim->subwim_node);
+ DEBUG("Freeing subwim.");
+ wimlib_free(subwim);
+ }
+