Changeset 75049 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Oct 24, 2018 4:06:42 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/ldr/ldrMemory.cpp
r73150 r75049 80 80 * Default destructor - pvUser points to the image memory block} 81 81 */ 82 static DECLCALLBACK(void) rtldrRdrMemDefaultDtor(void *pvUser) 83 { 82 static DECLCALLBACK(void) rtldrRdrMemDefaultDtor(void *pvUser, size_t cbImage) 83 { 84 RT_NOREF(cbImage); 84 85 RTMemFree(pvUser); 85 86 } … … 202 203 { 203 204 PRTLDRRDRMEM pThis = (PRTLDRRDRMEM)pReader; 204 pThis->pfnDtor(pThis->pvUser); 205 pThis->pfnDtor(pThis->pvUser, pThis->cbImage); 206 pThis->pfnDtor = NULL; 207 pThis->pvUser = NULL; 205 208 RTMemFree(pThis); 206 209 return VINF_SUCCESS; … … 279 282 /* The rest of the validations will call the destructor. */ 280 283 AssertMsgReturnStmt(!(fFlags & ~RTLDR_O_VALID_MASK), ("%#x\n", fFlags), 281 pfnDtor(pvUser ), VERR_INVALID_PARAMETER);284 pfnDtor(pvUser, cbImage), VERR_INVALID_PARAMETER); 282 285 AssertMsgReturnStmt(enmArch > RTLDRARCH_INVALID && enmArch < RTLDRARCH_END, ("%d\n", enmArch), 283 pfnDtor(pvUser ), VERR_INVALID_PARAMETER);286 pfnDtor(pvUser, cbImage), VERR_INVALID_PARAMETER); 284 287 if (!pfnRead) 285 288 pfnRead = rtldrRdrMemDefaultReader; 286 289 else 287 AssertReturnStmt(RT_VALID_PTR(pfnRead), pfnDtor(pvUser ), VERR_INVALID_POINTER);288 AssertReturnStmt(cbImage > 0, pfnDtor(pvUser ), VERR_INVALID_PARAMETER);290 AssertReturnStmt(RT_VALID_PTR(pfnRead), pfnDtor(pvUser, cbImage), VERR_INVALID_POINTER); 291 AssertReturnStmt(cbImage > 0, pfnDtor(pvUser, cbImage), VERR_INVALID_PARAMETER); 289 292 290 293 /* … … 312 315 else 313 316 { 314 pfnDtor(pvUser );317 pfnDtor(pvUser, cbImage); 315 318 rc = RTErrInfoSetF(pErrInfo, rc, "rtldrRdrMem_Create failed: %Rrc", rc); 316 319 }
Note:
See TracChangeset
for help on using the changeset viewer.