quartz: Use proper alloc/free functions for COM objects
Detlef Riekenberg
wine.dev at web.de
Thu Mar 8 10:14:54 CST 2007
On Do, 2007-03-08 at 03:06 -0800, Chris Robinson wrote:
> Subject: [PATCH] quartz: Use proper alloc/free functions for COM
> objects
> + omr->messages = CoTaskMemAlloc(omr->ring_buffer_size *
> sizeof(Event));
> + ZeroMemory(omr->messages, omr->ring_buffer_size * sizeof(Event));
>
> + fimpl = CoTaskMemAlloc(sizeof(*fimpl));
> fimpl->IGraphBuilder_vtbl = &IGraphBuilder_VTable;
> + This->ppPins = CoTaskMemAlloc((This->cStreams + 2) * sizeof(IPin
> *));
> memcpy(This->ppPins, ppOldPins, (This->cStreams + 1) *
> sizeof(IPin *));
> + This->ppPins = CoTaskMemAlloc(sizeof(IPin *) * 1);
> memcpy(This->ppPins, ppOldPins, sizeof(IPin *) * 1);
While reading your Patch, I see the above Places, where the result
from the allocation is used without a NULL-check.
The other allocations are checked for NULL before used.
Is this correct?
--
By by ... Detlef
More information about the wine-devel
mailing list