This bug originated from the following question raised by Fujitsu engineers:
==== Fujitsu Question Start ===
When we investigate the src fix diff. for 4745575,
we find out the portion which seems to cause resource leak.
In src/windows/native/sun/windows/ShellFolder.cpp(1.4.2_11),
The current line#702 - 706 is
------->
// Get the screen DC
HDC dc = GetDC(NULL);
if (dc == NULL) {
return NULL;
}
<------
However, if dc==NULL, resource leak seems to occur.
We think that portion should be as follows.
------>
// Get the screen DC
HDC dc = GetDC(NULL);
if (dc == NULL) {
+ ::DeleteObject(iconInfo.hbmColor);
+ ::DeleteObject(iconInfo.hbmMask);
return NULL;
}
<-----
=====Fujitsu Question End =====