On Mon, 22 Nov 2021 19:13:11 GMT, Alexey Ivanov <aiva...@openjdk.org> wrote:
>> Alexander Zuev has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Added bad_malloc handling >> Fixed insets >> Declaration and assignment are now joined > > src/java.desktop/windows/native/libawt/windows/ShellFolder2.cpp line 1097: > >> 1095: free(colorBits); >> 1096: >> 1097: CATCH_BAD_ALLOC_RET(NULL); > > I believe we leak `dc` as well as `iconInfo.hbmColor` and `iconInfo.hbmMask` > if `std::bad_alloc` is thrown. Fixed. Now we will release these resources on exit in case of bad_alloc. ------------- PR: https://git.openjdk.java.net/jdk/pull/6473