[PATCH 0/1] MR5958: d3dx9_36: Remove superflous nullcheck (coverity)
Since we return when the factory creation fails, it can't be null here -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5958
From: Fabian Maurer <dark.shadow4(a)web.de> Since we return when the factory creation fails, it can't be null here --- dlls/d3dx9_36/surface.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dlls/d3dx9_36/surface.c b/dlls/d3dx9_36/surface.c index 3e0b880eec4..fbe1755f2f7 100644 --- a/dlls/d3dx9_36/surface.c +++ b/dlls/d3dx9_36/surface.c @@ -1102,8 +1102,7 @@ exit: IWICBitmapDecoder_Release(bitmap_decoder); if (wic_stream) IWICStream_Release(wic_stream); - if (wic_factory) - IWICImagingFactory_Release(wic_factory); + IWICImagingFactory_Release(wic_factory); return hr; } -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/5958
Patch seems correct but I have a couple of nits: - you can now get rid of the `wic_factory` initialization at the top of the function - please use "d3dx9:" as the subject prefix Thanks for the MR! -- https://gitlab.winehq.org/wine/wine/-/merge_requests/5958#note_75126
participants (3)
-
Fabian Maurer -
Fabian Maurer (@DarkShadow44) -
Matteo Bruni (@Mystral)