Merge pull request #7302 from Robyt3/Cmdline-Fix-Leak

Fix leak of command line arguments on Windows
This commit is contained in:
Dennis Felsing 2023-10-05 21:45:26 +00:00 committed by GitHub
commit 655902cf7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4039,6 +4039,7 @@ void cmdline_fix(int *argc, const char ***argv)
new_argv[i + 1] = new_argv[i] + size;
}
LocalFree(wide_argv);
new_argv[wide_argc] = 0;
*argc = wide_argc;
*argv = (const char **)new_argv;