VirtualBox

Changeset 101122 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Sep 14, 2023 3:59:37 PM (16 months ago)
Author:
vboxsync
Message:

FE/Qt: Fixing UINotificationCenter use-after-free revealed by asan; This was reproducible only for the case when keep finished progresses alive functionality is enabled.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.cpp

    r99265 r101122  
    411411
    412412    /* Cleanup items first: */
    413     cleanup();
     413    cleanupItems();
    414414
    415415    /* Populate model contents again: */
     
    753753}
    754754
    755 void UINotificationCenter::cleanup()
    756 {
    757     /* Cleanup items: */
     755void UINotificationCenter::cleanupModel()
     756{
     757    delete m_pModel;
     758    m_pModel = 0;
     759}
     760
     761void UINotificationCenter::cleanupItems()
     762{
    758763    qDeleteAll(m_items);
    759764    m_items.clear();
     765}
     766
     767void UINotificationCenter::cleanup()
     768{
     769    cleanupModel();
     770    cleanupItems();
    760771}
    761772
  • trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationCenter.h

    r99265 r101122  
    163163    /** Prepares open-timer. */
    164164    void prepareOpenTimer();
     165    /** Cleanups model. */
     166    void cleanupModel();
     167    /** Cleanups items. */
     168    void cleanupItems();
    165169    /** Cleanups everything. */
    166170    void cleanup();
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