Commit e4d63f77 authored by Marcus Meissner's avatar Marcus Meissner Committed by Alexandre Julliard

dmstyle: Reverse NULL check and deref (Coverity).

parent 4e4aeead
......@@ -730,11 +730,11 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePatternList (LPPERSIST
TRACE_(dmfile)(": Pattern chunk\n");
/** alloc new motif entry */
pNewMotif = HeapAlloc (GetProcessHeap (), HEAP_ZERO_MEMORY, sizeof(DMUS_PRIVATE_STYLE_MOTIF));
list_add_tail (&This->Motifs, &pNewMotif->entry);
if (NULL == pNewMotif) {
ERR(": no more memory\n");
return E_OUTOFMEMORY;
}
list_add_tail (&This->Motifs, &pNewMotif->entry);
IStream_Read (pStm, &pNewMotif->pattern, Chunk.dwSize, NULL);
/** TODO trace pattern */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment