Author: jgardou
Date: Sat Oct 25 18:11:27 2014
New Revision: 64991
URL:
http://svn.reactos.org/svn/reactos?rev=64991&view=rev
Log:
[WIN32K]
- Avoid leaking handles when loading animated cursors.
Modified:
trunk/reactos/win32ss/user/ntuser/cursoricon_new.c
Modified: trunk/reactos/win32ss/user/ntuser/cursoricon_new.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/cursor…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/cursoricon_new.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/cursoricon_new.c [iso-8859-1] Sat Oct 25 18:11:27
2014
@@ -229,7 +229,10 @@
UINT i;
for(i = 0; i < AniCurIcon->cpcur; i++)
+ {
+ UserDereferenceObject(AniCurIcon->aspcur[i]);
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
+ }
ExFreePoolWithTag(AniCurIcon->aspcur, USERTAG_CURSOR);
}
@@ -1068,7 +1071,10 @@
for(i = 0; i < numFrames; i++)
{
if(AniCurIcon->aspcur[i])
+ {
+ UserDereferenceObject(AniCurIcon->aspcur[i]);
IntDestroyCurIconObject(AniCurIcon->aspcur[i]);
+ }
}
AniCurIcon->cicur = 0;
AniCurIcon->cpcur = 0;