Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonojenkins <jo.shields+jenkins@xamarin.com>2021-02-10 07:48:59 +0300
committerGitHub <noreply@github.com>2021-02-10 07:48:59 +0300
commitc621c35ffa03273dbfb83055c7587c6a6617295a (patch)
tree199052bcd1d59477bab1e106b08e560086500789
parent715757301fca88e06e8406a4bd56f71030f1c804 (diff)
Fix early return in Process.Start (#20833)mono-6.12.0.122
Co-authored-by: Ryan Lucia <rylucia@microsoft.com>
-rw-r--r--mono/metadata/w32process-unix.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/mono/metadata/w32process-unix.c b/mono/metadata/w32process-unix.c
index 426e12810c4..5bbad7130df 100644
--- a/mono/metadata/w32process-unix.c
+++ b/mono/metadata/w32process-unix.c
@@ -2028,6 +2028,9 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar
static char *handler;
static gunichar2 *handler_utf16;
+#ifndef HOST_DARWIN
+ gboolean finished = FALSE;
+#endif
if (handler_utf16 == (gunichar2 *)-1) {
ret = FALSE;
@@ -2053,6 +2056,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar
if (handler == NULL){
handler_utf16 = (gunichar2 *) -1;
ret = FALSE;
+ finished = TRUE;
} else {
/* kfmclient needs exec argument */
char *old = handler;
@@ -2063,9 +2067,8 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar
}
}
MONO_EXIT_GC_SAFE;
- if (ret == FALSE){
+ if (finished)
goto done;
- }
#endif
handler_utf16 = g_utf8_to_utf16 (handler, -1, NULL, NULL, NULL);
g_free (handler);