Integrated: JDK-8313252: Java_sun_awt_windows_ThemeReader_paintBackground release resources in early returns
Matthias Baesken
mbaesken at openjdk.org
Mon Jul 31 15:00:59 UTC 2023
On Fri, 28 Jul 2023 07:52:14 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:
> In file ThemeReader.cpp functionJava_sun_awt_windows_ThemeReader_paintBackground
> we create DCs and release them at the end, but seems we miss it in early returns.
>
> While looking at the code, I noticed that CreateCompatibleDC can return NULL in case of error/failure, but we ignore this case; see
> https://learn.microsoft.com/en-us/windows/win32/api/wingdi/nf-wingdi-createcompatibledc .
> Should we better handle it or is it not really occurring in practise ?
This pull request has now been integrated.
Changeset: 3671d83c
Author: Matthias Baesken <mbaesken at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/3671d83c87302ead09d4ebce9cb85bdd803a0c20
Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
8313252: Java_sun_awt_windows_ThemeReader_paintBackground release resources in early returns
Reviewed-by: clanger
-------------
PR: https://git.openjdk.org/jdk/pull/15064
More information about the client-libs-dev
mailing list