Skip to content

Commit 8258f27

Browse files
committed
8313252: Java_sun_awt_windows_ThemeReader_paintBackground release resources in early returns
Backport-of: 3671d83c87302ead09d4ebce9cb85bdd803a0c20
1 parent 2a9f6e8 commit 8258f27

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/java.desktop/windows/native/libawt/windows/ThemeReader.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -427,6 +427,7 @@ JNIEXPORT void JNICALL Java_sun_awt_windows_ThemeReader_paintBackground
427427
NULL, 0);
428428
if (hDibSection == NULL) {
429429
DTRACE_PRINTLN("Error creating DIB section");
430+
DeleteDC(memDC);
430431
ReleaseDC(NULL,defaultDC);
431432
return;
432433
}

0 commit comments

Comments
 (0)