]> wimlib.net Git - wimlib/blobdiff - src/win32.c
refcnt image metadata; calculate full path on-demand
[wimlib] / src / win32.c
index b3aec1cbfc2b97e3d06a0ae642feea851504baf3..8110d4fb2c3b86779e59715e5ca36e797186d1bc 100644 (file)
@@ -585,12 +585,14 @@ win32_capture_stream(const wchar_t *path,
        spath = NULL;
        lte->resource_location = RESOURCE_WIN32;
        lte->resource_entry.original_size = (u64)dat->StreamSize.QuadPart;
-       lookup_table_insert_unhashed(lookup_table, lte);
 
+       struct wim_lookup_table_entry **my_ptr;
        if (is_named_stream)
-               ads_entry->lte = lte;
+               my_ptr = &ads_entry->lte;
        else
-               inode->i_lte = lte;
+               my_ptr = &inode->i_lte;
+
+       lookup_table_insert_unhashed(lookup_table, lte, my_ptr);
 out_free_spath:
        FREE(spath);
 out: