During initializing native data of `X11GraphicsEnvironment`, a single `AwtGraphicsConfigData` is used/reused, not only failed cases, but also succeeded cases. So `AwtGraphicsConfigData` internal states need to be cleanup properly to avoid memory leaks.
Test: - [x] jdk_awt ------------- Commit messages: - Merge branch 'master' into JDK-8284956-memleak_awtImageData_awt_allocate_colors - cleanup - v1 - v0 Changes: https://git.openjdk.java.net/jdk/pull/8317/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8317&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284956 Stats: 36 lines in 1 file changed: 25 ins; 4 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8317.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8317/head:pull/8317 PR: https://git.openjdk.java.net/jdk/pull/8317