[2/2]dwrite: basic implementation for FontCollectionLoader registration
Piotr Caban
piotr.caban at gmail.com
Fri Aug 1 12:28:55 CDT 2014
On 8/1/14 12:01 PM, Aric Stewart wrote:
> + if (i == This->CollectionLoaderCount)
> + {
> + This->CollectionLoaderCount++;
> + if (This->CollectionLoaders)
> + This->CollectionLoaders = heap_realloc(This->CollectionLoaders, This->CollectionLoaderCount * sizeof(IDWriteFontCollectionLoader*));
> + else
> + This->CollectionLoaders = heap_alloc(This->CollectionLoaderCount * sizeof(IDWriteFontCollectionLoader*));
> + if (!This->CollectionLoaders)
> + return E_OUTOFMEMORY;
> + }
There's a leak in out of memory case. Isn't it better to grow the buffer
exponentially?
More information about the wine-devel
mailing list