VirtualBox

Changeset 25660 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jan 5, 2010 4:52:08 PM (15 years ago)
Author:
vboxsync
Message:

thread.cpp: Fixed case of accessing RTTHRADINT after it was freed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r25648 r25660  
    524524}
    525525
    526 
    527526/**
    528527 * Release a per thread data structure.
     
    542541    }
    543542    else
     543    {
    544544        cRefs = 0;
     545        AssertFailed();
     546    }
    545547    return cRefs;
    546548}
     
    571573
    572574    /*
    573      * Invalidate the thread structure and free it.
     575     * Invalidate the thread structure.
    574576     */
    575577#ifdef IN_RING3
     
    585587    pThread->EventTerminated = NIL_RTSEMEVENTMULTI;
    586588
    587     RTMemFree(pThread);
    588 
    589589#ifdef IN_RING3
    590590    rtLockValidatorSerializeDestructLeave();
     
    592592
    593593    /*
    594      * Destroy semaphore resources.
     594     * Destroy semaphore resources and free the bugger.
    595595     */
    596596    RTSemEventMultiDestroy(hEvt1);
    597597    if (hEvt2 != NIL_RTSEMEVENTMULTI)
    598598        RTSemEventMultiDestroy(hEvt2);
     599
     600    RTMemFree(pThread);
    599601}
    600602
Note: See TracChangeset for help on using the changeset viewer.

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