Skip to content

Commit 9ccc208

Browse files
committed
Properly memscope execution
1 parent 4f7da01 commit 9ccc208

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

aws-runtime/aws-config/native/src/aws/sdk/kotlin/runtime/auth/credentials/executeCommandNative.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ internal actual suspend fun executeCommand(
5757
else -> "-c"
5858
}
5959

60-
val argv = memScoped { (arrayOf(shell, shellArg, command).map { it.cstr.ptr } + null).toCValues() }
61-
execvp(shell, argv)
60+
memScoped {
61+
val argv = (arrayOf(shell, shellArg, command).map { it.cstr.ptr } + null).toCValues()
62+
execvp(shell, argv)
63+
}
6264
_exit(127) // If exec fails
6365
}
6466

0 commit comments

Comments
 (0)