cmd: Fixed memory leak in WCMD_run_program.

This commit is contained in:
Piotr Caban 2013-03-01 14:31:13 +01:00 committed by Alexandre Julliard
parent 4682730815
commit 743a42b259

View file

@ -1213,6 +1213,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
Note: Launching internal wine processes cannot specify a full path to exe */
status = CreateProcessW(assumeInternal?NULL : thisDir,
command, NULL, NULL, TRUE, 0, NULL, NULL, &st, &pe);
heap_free(st.lpReserved2);
if ((opt_c || opt_k) && !opt_s && !status
&& GetLastError()==ERROR_FILE_NOT_FOUND && command[0]=='\"') {
/* strip first and last quote WCHARacters and try again */