VirtualBox

Changeset 77191 in vbox


Ignore:
Timestamp:
Feb 6, 2019 9:14:23 PM (6 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
128680
Message:

Main/HGCMThread: Don't clear the thread handle when the thread exits as the thread was created waitable and the handle is required to properly wait on it for termination (first and foremost memory leak fix but who knows, might also fix some HGCM related races where the service thread didn't terminate and the service was already destroyed)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/HGCMThread.cpp

    r76553 r77191  
    202202    pThread->m_fu32ThreadFlags |= HGCMMSG_TF_TERMINATED;
    203203
    204     pThread->m_hThread = NIL_RTTHREAD;
    205 
    206204    LogFlow(("MAIN::hgcmWorkerThreadFunc: completed HGCM thread %p\n", pThread));
    207205
     
    259257
    260258    if (m_hThread != NIL_RTTHREAD)
     259    {
    261260        rc = RTThreadWait(m_hThread, 5000, NULL);
     261        m_hThread = NIL_RTTHREAD;
     262    }
    262263
    263264    LogFlowFunc(("rc = %Rrc\n", rc));
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette