- Timestamp:
- Oct 26, 2010 8:56:38 PM (14 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/VDIHDDCore.cpp
r33271 r33478 711 711 { 712 712 rc = vdiError(pImage, rc, RT_SRC_POS, N_("VDI: writing block failed for '%s'"), pImage->pszFilename); 713 RTMemTmpFree(pvBuf); 713 714 goto out; 714 715 } -
trunk/src/VBox/Devices/Storage/VHDHDDCore.cpp
r33182 r33478 922 922 pImage->pBlockAllocationTable = (uint32_t *)RTMemAllocZ(pImage->cBlockAllocationTableEntries * sizeof(uint32_t)); 923 923 if (!pImage->pBlockAllocationTable) 924 { 925 RTMemFree(pBlockAllocationTable); 924 926 return VERR_NO_MEMORY; 927 } 925 928 926 929 for (i = 0; i < pImage->cBlockAllocationTableEntries; i++) … … 1517 1520 /* Get I/O interface. */ 1518 1521 pImage->pInterfaceIO = VDInterfaceGet(pImage->pVDIfsImage, VDINTERFACETYPE_IOINT); 1519 AssertPtrReturn(pImage->pInterfaceIO, VERR_INVALID_PARAMETER); 1522 if (RT_UNLIKELY(!VALID_PTR(pImage->pInterfaceIO))) 1523 { 1524 RTMemFree(pImage); 1525 return VERR_INVALID_PARAMETER; 1526 } 1520 1527 pImage->pInterfaceIOCallbacks = VDGetInterfaceIOInt(pImage->pInterfaceIO); 1521 AssertPtrReturn(pImage->pInterfaceIOCallbacks, VERR_INVALID_PARAMETER); 1528 if (RT_UNLIKELY(!VALID_PTR(pImage->pInterfaceIOCallbacks))) 1529 { 1530 RTMemFree(pImage); 1531 return VERR_INVALID_PARAMETER; 1532 } 1522 1533 1523 1534 rc = vhdCreateImage(pImage, cbSize, uImageFlags, pszComment, -
trunk/src/VBox/Devices/Storage/VmdkHDDCore.cpp
r33464 r33478 3199 3199 int rc = VINF_SUCCESS; 3200 3200 PVMDKEXTENT pExtents = (PVMDKEXTENT)RTMemAllocZ(cExtents * sizeof(VMDKEXTENT)); 3201 if (p Image)3201 if (pExtents) 3202 3202 { 3203 3203 for (unsigned i = 0; i < cExtents; i++) … … 5400 5400 uGDIndex = uSector / pExtent->cSectorsPerGDE; 5401 5401 if (uGDIndex >= pExtent->cGDEntries) 5402 { 5403 RTMemFree(pGrainAlloc); 5402 5404 return VERR_OUT_OF_RANGE; 5405 } 5403 5406 uGTSector = pExtent->pGD[uGDIndex]; 5404 5407 if (pExtent->pRGD) … … 5900 5903 if (!pImage->pDescData) 5901 5904 { 5905 RTMemFree(pImage); 5902 5906 rc = VERR_NO_MEMORY; 5903 5907 goto out;
Note:
See TracChangeset
for help on using the changeset viewer.