VirtualBox

Changeset 5161 in vbox


Ignore:
Timestamp:
Oct 4, 2007 9:10:22 PM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
25057
Message:

Main: create copy of the format string before freeing it

File:
1 edited

Legend:

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

    r5122 r5161  
    44184418            vrc = VDCreate (pszFormat, VDError, this, &mContainer);
    44194419
     4420            if (VBOX_SUCCESS(vrc))
     4421                mFormat = Bstr (pszFormat);
     4422
    44204423            RTStrFree (pszFormat);
    44214424
    44224425            /* the format has been already checked for presence at this point */
    44234426            ComAssertRCBreak (vrc, rc = E_FAIL);
    4424 
    4425             mFormat = Bstr (pszFormat);
    44264427
    44274428            /* Call queryInformation() anyway (even if it will block), because
     
    48804881        Guid id, parentId;
    48814882
    4882         /// @todo changed from VD_OPEN_FLAGS_READONLY to VD_OPEN_FLAGS_NORMAL,
    4883         /// because otherwise registering a virtual harddisk which so far has no UUID will
    4884         /// yield a null UUID. It cannot be added to a custom harddisk opened readonly,
    4885         /// obviously. This of course changes locking behavior, but for now
    4886         /// this is acceptable. A better solution needs to be found later.
    4887         vrc = VDOpen (mContainer, location, VD_OPEN_FLAGS_NORMAL);
     4883        vrc = VDOpen (mContainer, location, VD_OPEN_FLAGS_INFO);
    48884884        if (VBOX_FAILURE (vrc))
    48894885            break;
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