VirtualBox

Changeset 23907 in vbox for trunk/include


Ignore:
Timestamp:
Oct 20, 2009 3:27:40 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
53708
Message:

Main: fix memory leak

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/com/string.h

    r22173 r23907  
    230230        if (pstr)
    231231        {
    232             *pstr = NULL;
     232            if (*pstr)
     233            {
     234                ::SysFreeString (*pstr);
     235                *pstr = NULL;
     236            }
    233237            raw_copy (*pstr, bstr);
    234238        }
     
    412416        if (pstr)
    413417        {
    414             *pstr = NULL;
     418            if (*pstr)
     419            {
     420                ::SysFreeString (*pstr);
     421                *pstr = NULL;
     422            }
    415423            Bstr::raw_copy(*pstr, m_psz);
    416424        }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette