mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fix leak of command line arguments on Windows
See https://learn.microsoft.com/en-us/windows/win32/api/shellapi/nf-shellapi-commandlinetoargvw#remarks
This commit is contained in:
parent
2b115b92fa
commit
a42ca9f638
|
@ -4039,6 +4039,7 @@ void cmdline_fix(int *argc, const char ***argv)
|
||||||
new_argv[i + 1] = new_argv[i] + size;
|
new_argv[i + 1] = new_argv[i] + size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LocalFree(wide_argv);
|
||||||
new_argv[wide_argc] = 0;
|
new_argv[wide_argc] = 0;
|
||||||
*argc = wide_argc;
|
*argc = wide_argc;
|
||||||
*argv = (const char **)new_argv;
|
*argv = (const char **)new_argv;
|
||||||
|
|
Loading…
Reference in a new issue