mirror of
https://github.com/reactos/reactos.git
synced 2024-09-11 05:12:43 +00:00
Fix ref counting bug
svn path=/trunk/; revision=12749
This commit is contained in:
parent
91fc5d1804
commit
0f86e212b1
|
@ -343,21 +343,25 @@ IntFindExistingCurIconObject(PWINSTATION_OBJECT WinStaObject, HMODULE hModule,
|
||||||
{
|
{
|
||||||
Object = CONTAINING_RECORD(CurrentEntry, CURICON_OBJECT, ListEntry);
|
Object = CONTAINING_RECORD(CurrentEntry, CURICON_OBJECT, ListEntry);
|
||||||
CurrentEntry = CurrentEntry->Flink;
|
CurrentEntry = CurrentEntry->Flink;
|
||||||
if((Object->hModule == hModule) && (Object->hRsrc == hRsrc))
|
if(NT_SUCCESS(ObmReferenceObjectByPointer(Object, otCursorIcon)))
|
||||||
{
|
{
|
||||||
if(cx && ((cx != Object->Size.cx) || (cy != Object->Size.cy)))
|
if((Object->hModule == hModule) && (Object->hRsrc == hRsrc))
|
||||||
{
|
|
||||||
ObmDereferenceObject(Object);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (! ReferenceCurIconByProcess(Object))
|
|
||||||
{
|
{
|
||||||
|
if(cx && ((cx != Object->Size.cx) || (cy != Object->Size.cy)))
|
||||||
|
{
|
||||||
|
ObmDereferenceObject(Object);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (! ReferenceCurIconByProcess(Object))
|
||||||
|
{
|
||||||
|
ExReleaseFastMutex(&CurIconListLock);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
ExReleaseFastMutex(&CurIconListLock);
|
ExReleaseFastMutex(&CurIconListLock);
|
||||||
return NULL;
|
return Object;
|
||||||
}
|
}
|
||||||
ExReleaseFastMutex(&CurIconListLock);
|
|
||||||
return Object;
|
|
||||||
}
|
}
|
||||||
|
ObmDereferenceObject(Object);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExReleaseFastMutex(&CurIconListLock);
|
ExReleaseFastMutex(&CurIconListLock);
|
||||||
|
|
Loading…
Reference in a new issue