VirtualBox

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


Ignore:
Timestamp:
Jan 6, 2017 10:24:59 AM (8 years ago)
Author:
vboxsync
Message:

VideoRec: Cleanup fixes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-client/VideoRec.cpp

    r65176 r65177  
    525525                delete pStream->pEBML;
    526526
     527            it = pCtx->vecStreams.erase(it);
     528
    527529            RTMemFree(pStream);
    528530            pStream = NULL;
    529 
    530             it = pCtx->vecStreams.erase(it);
    531531        }
    532532
     
    568568    RTSemEventDestroy(pCtx->TermEvent);
    569569
    570     for (VideoRecStreams::iterator it = pCtx->vecStreams.begin(); it != pCtx->vecStreams.end(); it++)
     570    VideoRecStreams::iterator it = pCtx->vecStreams.begin();
     571    while (it != pCtx->vecStreams.end())
    571572    {
    572573        PVIDEORECSTREAM pStream = (*it);
     
    591592        }
    592593
    593         delete pStream->pEBML;
    594     }
    595 
     594        if (pStream->pEBML)
     595        {
     596            delete pStream->pEBML;
     597            pStream->pEBML = NULL;
     598        }
     599
     600        it = pCtx->vecStreams.erase(it);
     601
     602        RTMemFree(pStream);
     603        pStream = NULL;
     604    }
     605
     606    Assert(pCtx->vecStreams.empty());
    596607    RTMemFree(pCtx);
    597608
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