On 21 July 2010 09:21, Nikolay Sivov bunglehead@gmail.com wrote:
On 7/21/2010 11:16, Austin English wrote:
Hm, good point. How's this?
diff --git a/dlls/dmusic/port.c b/dlls/dmusic/port.c index 021f1e2..23fa1b8 100644 --- a/dlls/dmusic/port.c +++ b/dlls/dmusic/port.c @@ -382,7 +382,8 @@ HRESULT WINAPI DMUSIC_CreateDirectMusicPortImpl (LPCGUID lpcGUID, LPVOID *ppobj, obj->pDirectSound = NULL; obj->pLatencyClock = NULL; hr = DMUSIC_CreateReferenceClockImpl(&IID_IReferenceClock, (LPVOID*)&obj->pLatencyClock, NULL);
- if(hr != S_OK)
- return E_FAIL;
if(0) { if (pPortParams->dwValidParams& DMUS_PORTPARAMS_CHANNELGROUPS) {
Thanks for reviewing!
Don't know, I'm not familiar with this at all. You need to figure out if this failure is critical enough to exit, and also it makes sense to return hr as is, not E_FAIL.
I don't know what I'm talking about either, but at the very least you'd be leaking "obj".