Microsoft KB Archive/827711

= Applications leak memory when creating COM objects by calling the CoCreateInstance function with a CLSID that is not valid on computers that are running Windows 2000 SP4 =

Article ID: 827711

Article Last Modified on 1/25/2005

-

APPLIES TO


 * Microsoft COM+ 1.0, when used with:
 * Microsoft Windows 2000 Service Pack 4

-





SYMPTOMS
After you apply Microsoft Windows 2000 Service Pack 4, if certain errors (such as invalid class identifiers (CLSIDs)) occur when applications try to create Component Object Model (COM) objects, the applications start to leak memory. The applications typically create COM objects by using the CoCreateInstance function. Analysis of the leaked memory shows environment variable strings.



CAUSE
During successful object creation, COM calls the GetEnvironmentStrings function and then calls the corresponding FreeEnvironmentStrings function. However, in certain error conditions (such as when the CLSID is not valid), COM does not call the FreeEnvironmentStrings function. Before Windows 2000 Service Pack 4, this was not a problem. With Windows 2000 Service Pack 4 or later, this causes a memory leak. With this hotfix applied, COM correctly calls the FreeEnvironmentStrings function even in error cases.



How to obtain the hotfix
This issue is fixed in the Microsoft COM+ 1.0 Hotfix Package 28. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:

828748 Availability of Windows 2000 Post-Service Pack 4 COM+ Hotfix Rollup Package 28



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section.

Additional query words: kbWin2000preSP5COMRollup28Fix

Keywords: kbbug kbfix kbwin2000presp5fix KB827711

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.