VirtualBox

Changeset 23911 in vbox


Ignore:
Timestamp:
Oct 20, 2009 3:56:43 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53713
Message:

Main: fix for fix for tiny memory leak in GetExtraData

Location:
trunk/src/VBox/Main
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Main/MachineImpl.cpp

    r23909 r23911  
    27432743
    27442744    /* start with nothing found */
    2745     Utf8Str strResult;
     2745    Bstr bstrResult("");
    27462746
    27472747    AutoReadLock alock (this);
     
    27502750    if (it != mData->m_pMachineConfigFile->mapExtraDataItems.end())
    27512751        // found:
    2752         strResult = it->second;
     2752        bstrResult = it->second; // source is a Utf8Str
    27532753
    27542754    /* return the result to caller (may be empty) */
    2755     strResult.cloneTo(aValue);
     2755    bstrResult.cloneTo(aValue);
    27562756
    27572757    return S_OK;
  • trunk/src/VBox/Main/VirtualBoxImpl.cpp

    r23909 r23911  
    16071607
    16081608    /* start with nothing found */
    1609     Utf8Str strResult;
     1609    Bstr bstrResult("");
    16101610
    16111611    settings::ExtraDataItemsMap::const_iterator it = m->pMainConfigFile->mapExtraDataItems.find(Utf8Str(aKey));
    16121612    if (it != m->pMainConfigFile->mapExtraDataItems.end())
    16131613        // found:
    1614         strResult = it->second;
     1614        bstrResult = it->second; // source is a Utf8Str
    16151615
    16161616    /* return the result to caller (may be empty) */
    1617     strResult.cloneTo(aValue);
     1617    bstrResult.cloneTo(aValue);
    16181618
    16191619    return S_OK;
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