[WIN32K:NTUSER]
authorThomas Faber <thomas.faber@reactos.org>
Sat, 26 Aug 2017 07:31:38 +0000 (07:31 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sat, 26 Aug 2017 07:31:38 +0000 (07:31 +0000)
- Remove unnecessary thread reference in IsThreadSuspended.

svn path=/trunk/; revision=75672

reactos/win32ss/user/ntuser/msgqueue.c

index 637df73..bba976a 100644 (file)
@@ -2216,9 +2216,7 @@ IsThreadSuspended(PTHREADINFO pti)
    if (pti->pEThread)
    {
       BOOL Ret = TRUE;
-      ObReferenceObject(pti->pEThread);
       if (!(pti->pEThread->Tcb.SuspendCount) && !PsGetThreadFreezeCount(pti->pEThread)) Ret = FALSE;
-      ObDereferenceObject(pti->pEThread);
       return Ret;
    }
    return FALSE;
@@ -2347,7 +2345,7 @@ MsqCleanupThreadMsgs(PTHREADINFO pti)
             {
                CurrentSentMessage->flags |= SMF_RECEIVERFREE;
             }
-            
+
             if (!(CurrentSentMessage->flags & SMF_RECEIVERFREE))
             {
 
@@ -2385,7 +2383,7 @@ MsqCleanupMessageQueue(PTHREADINFO pti)
       /* cleanup posted messages */
       while (!IsListEmpty(&MessageQueue->HardwareMessagesListHead))
       {
-         CurrentEntry = MessageQueue->HardwareMessagesListHead.Flink;       
+         CurrentEntry = MessageQueue->HardwareMessagesListHead.Flink;
          CurrentMessage = CONTAINING_RECORD(CurrentEntry, USER_MESSAGE, ListEntry);
          ERR("MQ Cleanup Post Messages %p\n",CurrentMessage);
          MsqDestroyMessage(CurrentMessage);