Windows: Free the argv we allocated for console_wmain().

main
Ryan C. Gordon 2015-02-19 21:50:40 -05:00
parent e974ccf828
commit 674eb55638
1 changed files with 6 additions and 1 deletions

View File

@ -140,6 +140,7 @@ console_ansi_main(int argc, char *argv[])
int
console_wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
{
int retval = 0;
char **argv = SDL_stack_alloc(char*, argc);
int i;
@ -147,7 +148,11 @@ console_wmain(int argc, wchar_t *wargv[], wchar_t *wenvp)
argv[i] = WIN_StringToUTF8(wargv[i]);
}
return main_utf8(argc, argv);
retval = main_utf8(argc, argv);
SDL_stack_free(argv);
return retval;
}
#endif