[kernel] Remove unnecessary string copy

This commit is contained in:
Joel Linn
2022-02-24 22:38:55 +01:00
committed by Rick Gibbed
parent b625ef0a38
commit 38d589d1e0
5 changed files with 14 additions and 15 deletions

View File

@@ -614,8 +614,7 @@ dword_result_t NtOpenSymbolicLinkObject_entry(
auto object_name =
kernel_memory()->TranslateVirtual<X_ANSI_STRING*>(object_attrs->name_ptr);
std::string target_path =
util::TranslateAnsiString(kernel_memory(), object_name);
auto target_path = util::TranslateAnsiString(kernel_memory(), object_name);
// Enforce that the path is ASCII.
if (!IsValidPath(target_path, false)) {