VirtualBox

Changeset 44940 in vbox for trunk/src/VBox/Storage/QED.cpp


Ignore:
Timestamp:
Mar 6, 2013 10:12:24 PM (12 years ago)
Author:
vboxsync
Message:

Storage/QED,QCOW: Fix backing filename handling (caused crashes and other weird behavior)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Storage/QED.cpp

    r44529 r44940  
    703703
    704704/**
    705  * Converts a given logical offset into the 
     705 * Converts a given logical offset into the
    706706 *
    707707 * @returns nothing.
     
    11501150
    11511151        if (pImage->pszBackingFilename)
     1152        {
    11521153            RTMemFree(pImage->pszBackingFilename);
     1154            pImage->pszBackingFilename = NULL;
     1155        }
    11531156
    11541157        qedL2TblCacheDestroy(pImage);
     
    12181221                {
    12191222                    /* Load backing filename from image. */
    1220                     pImage->pszFilename = (char *)RTMemAllocZ(Header.u32BackingFilenameSize + 1); /* +1 for \0 terminator. */
    1221                     if (pImage->pszFilename)
     1223                    pImage->pszBackingFilename = (char *)RTMemAllocZ(Header.u32BackingFilenameSize + 1); /* +1 for \0 terminator. */
     1224                    if (pImage->pszBackingFilename)
    12221225                    {
    12231226                        pImage->cbBackingFilename  = Header.u32BackingFilenameSize;
     
    24662469    AssertPtr(pImage);
    24672470    if (pImage)
    2468         if (pImage->pszFilename)
     2471        if (pImage->pszBackingFilename)
    24692472            *ppszParentFilename = RTStrDup(pImage->pszBackingFilename);
    24702473        else
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