зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
0f81decbc5
Коммит
5a8dd66e26
|
@ -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;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче