mirror of
https://github.com/reactos/wine.git
synced 2024-12-03 01:12:25 +00:00
windowscodecs: Fix memory leak in ComponentFactory_CreateBitmapFromSource.
This commit is contained in:
parent
8340636c55
commit
831b7371bc
@ -547,20 +547,22 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromSource(IWICComponentFacto
|
||||
IWICBitmapLock_Release(lock);
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
hr = PaletteImpl_Create(&palette);
|
||||
|
||||
if (SUCCEEDED(hr) && (format_type == WICPixelFormatNumericRepresentationUnspecified ||
|
||||
format_type == WICPixelFormatNumericRepresentationIndexed))
|
||||
{
|
||||
hr = IWICBitmapSource_CopyPalette(piBitmapSource, palette);
|
||||
hr = PaletteImpl_Create(&palette);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
hr = IWICBitmap_SetPalette(result, palette);
|
||||
else
|
||||
hr = S_OK;
|
||||
{
|
||||
hr = IWICBitmapSource_CopyPalette(piBitmapSource, palette);
|
||||
|
||||
IWICPalette_Release(palette);
|
||||
if (SUCCEEDED(hr))
|
||||
hr = IWICBitmap_SetPalette(result, palette);
|
||||
else
|
||||
hr = S_OK;
|
||||
|
||||
IWICPalette_Release(palette);
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
|
Loading…
Reference in New Issue
Block a user