[PATCH] dmstyle: reverse NULL check and deref (Coverity)
Marcus Meissner
marcus at jet.franken.de
Sun Jun 26 09:57:51 CDT 2011
Hi,
CID 2012.
Ciao, Marcus
---
dlls/dmstyle/style.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/dmstyle/style.c b/dlls/dmstyle/style.c
index eb6e77c..547025e 100644
--- a/dlls/dmstyle/style.c
+++ b/dlls/dmstyle/style.c
@@ -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 */
--
1.7.3.4
More information about the wine-patches
mailing list