+void destroy_image_metadata(struct image_metadata *imd,
+ struct wim_lookup_table *table)
+{
+ free_dentry_tree(imd->root_dentry, table);
+ free_security_data(imd->security_data);
+
+ /* Get rid of the lookup table entry for this image's metadata resource
+ * */
+ if (table) {
+ lookup_table_unlink(table, imd->metadata_lte);
+ free_lookup_table_entry(imd->metadata_lte);
+ }
+}
+