On Mon, 11 Apr 2022 18:05:09 GMT, Zhengyu Gu <z...@openjdk.org> wrote:
> Please review this small patch that releases temporary charsets to avoid > memory leak. > > Test: > > - [x] jdk_2d src/java.desktop/unix/native/common/awt/fontpath.c line 1112: > 1110: if (currentUnionSet != charset) { > 1111: (*FcCharSetDestroy)(currentUnionSet); > 1112: } Hmm. I worry that you may be replacing a leak with a crash. The original "charset" was returned from FcPatternGetCharSet() and I don't think it was a copy and will be freed when the pattern is destroyed. So that should not be freed here. ------------- PR: https://git.openjdk.java.net/jdk/pull/8187