Kernel: Also move() the shebang path in execve

This commit is contained in:
Jelle Raaijmakers 2021-06-13 17:20:35 +02:00 committed by Andreas Kling
commit 26250779d1
Notes: sideshowbarker 2024-07-18 12:17:47 +09:00

View file

@ -851,7 +851,7 @@ KResult Process::exec(String path, Vector<String> arguments, Vector<String> envi
auto shebang_path = shebang_words.first();
if (!arguments.try_prepend(move(shebang_words)))
return ENOMEM;
return exec(shebang_path, move(arguments), move(environment), ++recursion_depth);
return exec(move(shebang_path), move(arguments), move(environment), ++recursion_depth);
}
// #2) ELF32 for i386