- goto out_free_path;
- }
-
- params->capture_root_nchars = ntpath.Length / sizeof(wchar_t);
- wmemcpy(path, ntpath.Buffer, params->capture_root_nchars);
- path[params->capture_root_nchars] = L'\0';
+ } else {
+ ntpath_nchars = ntpath.Length / sizeof(wchar_t);
+ wmemcpy(path, ntpath.Buffer, ntpath_nchars);
+ path[ntpath_nchars] = L'\0';