- ntfs_loc = CALLOC(1, sizeof(*ntfs_loc));
- if (!ntfs_loc)
- goto out_put_actx;
- ntfs_loc->ntfs_vol_p = ntfs_vol_p;
- ntfs_loc->path = MALLOC(path_len + 1);
- if (!ntfs_loc->path)
- goto out_free_ntfs_loc;
- memcpy(ntfs_loc->path, path, path_len + 1);
- if (name_length) {
- ntfs_loc->stream_name = MALLOC(name_length * 2);
- if (!ntfs_loc->stream_name)
- goto out_free_ntfs_loc;
- memcpy(ntfs_loc->stream_name,
- attr_record_name(actx->attr),
- actx->attr->name_length * 2);
- ntfs_loc->stream_name_nchars = name_length;
- }
-
- lte = new_lookup_table_entry();
- if (!lte)
- goto out_free_ntfs_loc;
- lte->ntfs_loc = ntfs_loc;
- lte->resource_location = RESOURCE_IN_NTFS_VOLUME;
- if (type == AT_REPARSE_POINT) {
- ntfs_loc->is_reparse_point = true;
- lte->resource_entry.original_size = data_size - 8;
- lte->resource_entry.size = data_size - 8;
- } else {
- ntfs_loc->is_reparse_point = false;
- lte->resource_entry.original_size = data_size;
- lte->resource_entry.size = data_size;
- }
- ntfs_loc = NULL;
- copy_hash(lte->hash, attr_hash);
- lookup_table_insert(lookup_table, lte);