mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 413599 - "debug build crashes on exit with memory corruption" [p=a@totic.org (Aleks Totic) r=bsmedberg a1.9=schrep]
This commit is contained in:
parent
99bab4cfb8
commit
9a4cd7139e
@ -52,7 +52,18 @@ int wmain(int argc, WCHAR **argv)
|
||||
}
|
||||
argvConverted[argc] = NULL;
|
||||
|
||||
// need to save argvConverted copy for later deletion.
|
||||
char **deleteUs = new char*[argc+1];
|
||||
if (!deleteUs) {
|
||||
FreeAllocStrings(argc, argvConverted);
|
||||
return 127;
|
||||
}
|
||||
for (int i=0; i<argc; i++)
|
||||
deleteUs[i] = argvConverted[i];
|
||||
int result = main(argc, argvConverted);
|
||||
FreeAllocStrings(argc, argvConverted);
|
||||
|
||||
delete[] argvConverted;
|
||||
FreeAllocStrings(argc, deleteUs);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user