VirtualBox

Changeset 107736 in vbox for trunk/src/VBox/Storage/VMDK.cpp


Ignore:
Timestamp:
Jan 14, 2025 9:11:31 AM (5 weeks ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
166843
Message:

Storage/VMDK.cpp: Fix parfait warning about unused assignment, we should return an error if memory allocation fails + todos, bugref:3409

File:
1 edited

Legend:

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

    r107723 r107736  
    86608660        return VERR_NO_MEMORY;
    86618661
     8662    /** @todo r=aeichner Carefully review the error handling logic, we mustn't leave the image in an inconsistent
     8663     *                   state if something fails, apart from hard underlying I/O errors of course.
     8664     *                   Memory allocation failures should not cause any corruptions.
     8665     */
    86628666    int rc;
    86638667    do
     
    86698673        uint32_t cbGTOff = RT_ALIGN_Z(VMDK_SECTOR2BYTE(cDirSectorDiff + cTableSectorDiff + cDirSectorDiff), 512);
    86708674
     8675        /** @todo r=aeichner An error here doesn't make the whole operation fail, it just breaks out of the loop. */
    86718676        for (int i = pExtent->cGDEntries - 1; i >= 0; i--)
    86728677        {
     
    87768781            pExtent->pRGD = (uint32_t *)RTMemReallocZ(pExtent->pRGD, pExtent->cGDEntries * sizeof(uint32_t), cbNewGD);
    87778782            if (RT_UNLIKELY(!pExtent->pRGD))
    8778                 rc = VERR_NO_MEMORY;
     8783                return VERR_NO_MEMORY;
    87798784        }
    87808785    }
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