windowscodecs: Fix memory leak in ComponentFactory_CreateBitmapFromSource.
This commit is contained in:
parent
8340636c55
commit
831b7371bc
|
@ -547,11 +547,12 @@ 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 = PaletteImpl_Create(&palette);
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
hr = IWICBitmapSource_CopyPalette(piBitmapSource, palette);
|
||||
|
||||
|
@ -562,6 +563,7 @@ static HRESULT WINAPI ComponentFactory_CreateBitmapFromSource(IWICComponentFacto
|
|||
|
||||
IWICPalette_Release(palette);
|
||||
}
|
||||
}
|
||||
|
||||
if (SUCCEEDED(hr))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue