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*));elseThis->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?