VirtualBox

Changeset 93896 in vbox


Ignore:
Timestamp:
Feb 23, 2022 12:48:07 PM (3 years ago)
Author:
vboxsync
Message:

VMM/PDMQueue: Free memory when the queue count drops to 0. Addresses the failure of tstPDMQueue in ASAN builds. bugref:10093

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMR3/PDMQueue.cpp

    r93612 r93896  
    433433                hQueue--;
    434434            pVM->pdm.s.cRing3Queues = hQueue;
     435            if (!hQueue)
     436            {
     437                pVM->pdm.s.cRing3QueuesAlloc = 0;
     438                PPDMQUEUE *papQueuesOld = ASMAtomicXchgPtrT(&pVM->pdm.s.papRing3Queues, NULL, PPDMQUEUE *);
     439                RTMemFree(papQueuesOld);
     440            }
    435441        }
    436442        pQueue->u32Magic = PDMQUEUE_MAGIC_DEAD;
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