diff options
author | monojenkins <jo.shields+jenkins@xamarin.com> | 2021-02-10 07:48:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-10 07:48:59 +0300 |
commit | c621c35ffa03273dbfb83055c7587c6a6617295a (patch) | |
tree | 199052bcd1d59477bab1e106b08e560086500789 | |
parent | 715757301fca88e06e8406a4bd56f71030f1c804 (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.c | 7 |
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); |