From 26250779d1ff5d583056444d67e585c24450c2c0 Mon Sep 17 00:00:00 2001 From: Jelle Raaijmakers Date: Sun, 13 Jun 2021 17:20:35 +0200 Subject: [PATCH] Kernel: Also `move()` the shebang path in execve --- Kernel/Syscalls/execve.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 73a15931d1..d5714eef1f 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -851,7 +851,7 @@ KResult Process::exec(String path, Vector arguments, Vector 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