mciseq: Fix error code path in async command execution.

This commit is contained in:
Jörg Höhle 2010-02-11 18:34:14 +01:00 committed by Alexandre Julliard
parent b14a08f388
commit 6dadd15bdf
1 changed files with 1 additions and 4 deletions

View File

@ -113,9 +113,6 @@ static DWORD CALLBACK MCI_SCAStarter(LPVOID arg)
TRACE("In thread after async command (%08x,%u,%08lx,%08lx)\n",
sca->wDevID, sca->wMsg, sca->dwParam1, sca->dwParam2);
HeapFree(GetProcessHeap(), 0, sca);
ExitThread(ret);
WARN("Should not happen ? what's wrong\n");
/* should not go after this point */
return ret;
}
@ -147,7 +144,7 @@ static DWORD MCI_SendCommandAsync(UINT wDevID, UINT wMsg, DWORD_PTR dwParam1,
if ((handle = CreateThread(NULL, 0, MCI_SCAStarter, sca, 0, NULL)) == 0) {
WARN("Couldn't allocate thread for async command handling, sending synchronously\n");
return MCI_SCAStarter(&sca);
return MCI_SCAStarter(sca);
}
SetThreadPriority(handle, THREAD_PRIORITY_TIME_CRITICAL);
CloseHandle(handle);