VirtualBox

Changeset 54945 in vbox for trunk/src/VBox/Main


Ignore:
Timestamp:
Mar 25, 2015 3:30:20 PM (10 years ago)
Author:
vboxsync
Message:

Main/Medium: release media locks by destroying tasks before sending task completion notifications (see #7763)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-server/MediumImpl.cpp

    r54885 r54945  
    769769    HRESULT rc = pTask->handler();
    770770
    771     /* complete the progress if run asynchronously */
     771    /*
     772     * save the progress reference if run asynchronously, since we want to
     773     * destroy the task before we send out the completion notification.
     774     * see @bugref{7763}
     775     */
     776    ComObjPtr<Progress> pProgress;
    772777    if (pTask->isAsync())
    773         if (!pTask->mProgress.isNull())
    774             pTask->mProgress->i_notifyComplete(rc);
     778        pProgress = pTask->mProgress;
    775779
    776780    /* pTask is no longer needed, delete it. */
    777781    delete pTask;
     782
     783    /* complete the progress if run asynchronously */
     784    if (!pProgress.isNull())
     785        pProgress->i_notifyComplete(rc);
    778786
    779787    LogFlowFunc(("rc=%Rhrc\n", rc));
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