Bug 289689 - "Memory leak: nsDebugImpl::Assertion, Create Process". r=dougt, sr=darin.

git-svn-id: svn://10.0.0.236/trunk@198922 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bent.mozilla%gmail.com 2006-06-02 23:37:10 +00:00
parent 3d8b6ab3c3
commit ffd74d2c73

View File

@ -405,16 +405,16 @@ Break(const char *aMsg)
// 2nd arg of CreateProcess is in/out
char *msgCopy = (char*) _alloca(strlen(aMsg) + 1);
strcpy(msgCopy, aMsg);
strcpy(msgCopy, aMsg);
if(GetModuleFileName(GetModuleHandle("xpcom.dll"), executable, MAX_PATH) &&
NULL != (pName = strrchr(executable, '\\')) &&
NULL != strcpy(pName+1, "windbgdlg.exe") &&
CreateProcess(executable, msgCopy, NULL, NULL, PR_FALSE,
DETACHED_PROCESS | NORMAL_PRIORITY_CLASS,
NULL, NULL, &si, &pi) &&
WAIT_OBJECT_0 == WaitForSingleObject(pi.hProcess, INFINITE) &&
GetExitCodeProcess(pi.hProcess, &code)) {
NULL, NULL, &si, &pi)) {
WaitForSingleObject(pi.hProcess, INFINITE);
GetExitCodeProcess(pi.hProcess, &code);
CloseHandle(pi.hProcess);
}