VirtualBox

Changeset 18149 in vbox for trunk/src


Ignore:
Timestamp:
Mar 23, 2009 4:28:11 PM (16 years ago)
Author:
vboxsync
Message:

Storage/VMDK: fix flush on close without breaking the cleanup when creation failed.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp

    r18141 r18149  
    23752375        pDescFile = pImage->pExtents[0].pFile;
    23762376    }
     2377    /* Bail out if there is no file to write to. */
     2378    if (pDescFile == NULL)
     2379        return VERR_INVALID_PARAMETER;
    23772380    for (unsigned i = 0; i < pImage->Descriptor.cLines; i++)
    23782381    {
     
    38483851        }
    38493852    }
    3850     /* Don't attempt to flush the image if there is no file - usually happens
    3851      * when creating fails for whatever reason. */
    3852     if (pImage->pFile != NULL)
    3853         (void)vmdkFlushImage(pImage);
     3853    (void)vmdkFlushImage(pImage);
    38543854
    38553855    if (pImage->pExtents != NULL)
     
    46394639    pImage->Descriptor.fDirty = true;
    46404640    /* Flush the descriptor now, in case it is embedded. */
    4641     vmdkFlushImage(pImage);
     4641    (void)vmdkFlushImage(pImage);
    46424642
    46434643    /* Close and rename/move extents. */
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