diff --git a/dlls/dmime/segment.c b/dlls/dmime/segment.c index e0d082d5c06..36766dbc681 100644 --- a/dlls/dmime/segment.c +++ b/dlls/dmime/segment.c @@ -246,10 +246,9 @@ static HRESULT WINAPI IDirectMusicSegment8Impl_IDirectMusicSegment8_InsertTrack } pNewSegTrack = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_TRACK)); - if (NULL == pNewSegTrack) { - ERR(": no more memory\n"); + if (NULL == pNewSegTrack) return E_OUTOFMEMORY; - } + pNewSegTrack->dwGroupBits = dwGroupBits; pNewSegTrack->pTrack = pTrack; IDirectMusicTrack_Init(pTrack, (IDirectMusicSegment *)iface); diff --git a/dlls/dmime/segtriggertrack.c b/dlls/dmime/segtriggertrack.c index 221feebe6e8..583561c48ec 100644 --- a/dlls/dmime/segtriggertrack.c +++ b/dlls/dmime/segtriggertrack.c @@ -274,10 +274,9 @@ static HRESULT IDirectMusicSegTriggerTrack_IPersistStream_ParseSegment (LPPERSIS TRACE_(dmfile)(": segment item chunk\n"); /** alloc new item entry */ pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_SEGMENT_ITEM)); - if (!pNewItem) { - ERR(": no more memory\n"); - return E_OUTOFMEMORY; - } + if (!pNewItem) + return E_OUTOFMEMORY; + IStream_Read (pStm, &pNewItem->header, sizeof(DMUS_IO_SEGMENT_ITEM_HEADER), NULL); TRACE_(dmfile)(" - lTimePhysical: %u\n", pNewItem->header.lTimeLogical); TRACE_(dmfile)(" - lTimePhysical: %u\n", pNewItem->header.lTimePhysical); diff --git a/dlls/dmime/tempotrack.c b/dlls/dmime/tempotrack.c index 21a46852695..b8dee90bcf2 100644 --- a/dlls/dmime/tempotrack.c +++ b/dlls/dmime/tempotrack.c @@ -113,10 +113,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IDirectMusicTrack_InitPlay (LPDIREC FIXME("(%p, %p, %p, %p, %d, %d): semi-stub\n", This, pSegmentState, pPerformance, ppStateData, dwVirtualTrack8ID, dwFlags); pState = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_PLAY_STATE)); - if (NULL == pState) { - ERR(": no more memory\n"); + if (NULL == pState) return E_OUTOFMEMORY; - } + /** TODO real fill useful data */ pState->dummy = 0; *ppStateData = pState; @@ -348,10 +347,9 @@ static HRESULT WINAPI IDirectMusicTempoTrack_IPersistStream_Load (LPPERSISTSTREA TRACE_(dmfile)(" - lTime = %u\n", item.lTime); TRACE_(dmfile)(" - dblTempo = %g\n", item.dblTempo); pNewItem = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_TEMPO_ITEM)); - if (NULL == pNewItem) { - ERR(": no more memory\n"); - return E_OUTOFMEMORY; - } + if (NULL == pNewItem) + return E_OUTOFMEMORY; + pNewItem->item = item; list_add_tail (&This->Items, &pNewItem->entry); pNewItem = NULL;