VirtualBox

Changeset 31934 in vbox for trunk


Ignore:
Timestamp:
Aug 24, 2010 4:11:16 PM (14 years ago)
Author:
vboxsync
Message:

VBoxService/PropCache: Fixed memory leak on destruction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/VBoxService/VBoxServicePropCache.cpp

    r31933 r31934  
    369369        while (pNode)
    370370        {
     371            PVBOXSERVICEVEPROPCACHEENTRY pNext = RTListNodeIsLast(&pCache->NodeHead, &pNode->NodeSucc)
     372                                                                  ? NULL :
     373                                                                    RTListNodeGetNext(&pNode->NodeSucc,
     374                                                                                      VBOXSERVICEVEPROPCACHEENTRY, NodeSucc);
     375            RTListNodeRemove(&pNode->NodeSucc);
     376
    371377            /*
    372378             * When destroying the cache and we have a temporary value, remove the
     
    383389            pNode->fFlags = 0;
    384390
    385             PVBOXSERVICEVEPROPCACHEENTRY pNext = RTListNodeGetNext(&pNode->NodeSucc, VBOXSERVICEVEPROPCACHEENTRY, NodeSucc);
    386             RTListNodeRemove(&pNode->NodeSucc);
    387391            RTMemFree(pNode);
    388392
    389             if (pNext && RTListNodeIsLast(&pCache->NodeHead, &pNext->NodeSucc))
    390                 break;
    391393            pNode = pNext;
    392394        }
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