VirtualBox

Changeset 72939 in vbox


Ignore:
Timestamp:
Jul 6, 2018 9:16:26 PM (6 years ago)
Author:
vboxsync
Message:

Main: My catch(std::bad_alloc) obsession. :-)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/src-all/SecretKeyStore.cpp

    r69500 r72939  
    136136        return VERR_ALREADY_EXISTS;
    137137
     138    SecretKey *pKey = NULL;
    138139    try
    139140    {
    140         SecretKey *pKey = new SecretKey(pbKey, cbKey, m_fKeyBufNonPageable);
     141        pKey = new SecretKey(pbKey, cbKey, m_fKeyBufNonPageable);
    141142
    142143        m_mapSecretKeys.insert(std::make_pair(strKeyId, pKey));
     
    145146    {
    146147        return rc;
     148    }
     149    catch (std::bad_alloc)
     150    {
     151        if (pKey)
     152            delete pKey;
     153        return VERR_NO_MEMORY;
    147154    }
    148155
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