Changeset 69967 in vbox
- Timestamp:
- Dec 7, 2017 10:38:48 AM (7 years ago)
- Location:
- trunk/src/VBox/Runtime/common/dvm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/dvm/dvm.cpp
r69886 r69967 161 161 * Destroys a volume handle. 162 162 * 163 * @param pThis The volume to destroy. 164 */ 165 static void rtDvmVolumeDestroy(PRTDVMVOLUMEINTERNAL pThis) 166 { 167 PRTDVMINTERNAL pVolMgr = pThis->pVolMgr; 168 169 AssertPtr(pVolMgr); 163 * @param pThis The volume manager instance. 164 * @param pVol The volume to destroy. 165 */ 166 static void rtDvmVolumeDestroy(PRTDVMINTERNAL pThis, PRTDVMVOLUMEINTERNAL pVol) 167 { 168 AssertPtr(pThis); 169 AssertPtr(pThis->pDvmFmtOps); 170 Assert(pVol->pVolMgr == pThis); 170 171 171 172 /* Close the volume. */ 172 pVolMgr->pDvmFmtOps->pfnVolumeClose(pThis->hVolFmt); 173 174 pThis->u32Magic = RTDVMVOLUME_MAGIC_DEAD; 175 pThis->pVolMgr = NULL; 176 pThis->hVolFmt = NIL_RTDVMVOLUMEFMT; 177 RTMemFree(pThis); 178 179 /* Release the reference of the volume manager. */ 180 RTDvmRelease(pVolMgr); 173 pThis->pDvmFmtOps->pfnVolumeClose(pVol->hVolFmt); 174 175 pVol->u32Magic = RTDVMVOLUME_MAGIC_DEAD; 176 pVol->pVolMgr = NULL; 177 pVol->hVolFmt = NIL_RTDVMVOLUMEFMT; 178 RTMemFree(pVol); 181 179 } 182 180 … … 240 238 AssertPtr(pThis->pDvmFmtOps); 241 239 240 /* */ 241 PRTDVMVOLUMEINTERNAL pItNext, pIt; 242 RTListForEachSafe(&pThis->VolumeList, pIt, pItNext, RTDVMVOLUMEINTERNAL, VolumeNode) 243 { 244 RTListNodeRemove(&pIt->VolumeNode); 245 rtDvmVolumeDestroy(pThis, pIt); 246 } 247 242 248 /* Let the backend do it's own cleanup first. */ 243 249 pThis->pDvmFmtOps->pfnClose(pThis->hVolMgrFmt); … … 253 259 pThis->DvmDisk.hVfsFile = NIL_RTVFSFILE; 254 260 } 261 255 262 RTMemFree(pThis); 256 263 } … … 354 361 { 355 362 RTListNodeRemove(&pIt->VolumeNode); 356 rtDvmVolumeDestroy(p It);363 rtDvmVolumeDestroy(pThis, pIt); 357 364 } 358 365 } -
trunk/src/VBox/Runtime/common/dvm/dvmvfs.cpp
r69942 r69967 618 618 */ 619 619 static DECLCALLBACK(int) rtDvmVfsDir_SetTimes(void *pvThis, PCRTTIMESPEC pAccessTime, PCRTTIMESPEC pModificationTime, 620 PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime)620 PCRTTIMESPEC pChangeTime, PCRTTIMESPEC pBirthTime) 621 621 { 622 622 NOREF(pvThis); NOREF(pAccessTime); NOREF(pModificationTime); NOREF(pChangeTime); NOREF(pBirthTime);
Note:
See TracChangeset
for help on using the changeset viewer.