Changeset 28317 in vbox for trunk/src/VBox/Additions/common/VBoxService
- Timestamp:
- Apr 14, 2010 6:06:05 PM (15 years ago)
- Location:
- trunk/src/VBox/Additions/common/VBoxService
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceBalloon.cpp
r28048 r28317 69 69 void *pv = RTMemPageAlloc(PAGE_SIZE); 70 70 g_fSysMadviseWorks = madvise(pv, PAGE_SIZE, MADV_DONTFORK) == 0; 71 RTMemPageFree(pv );71 RTMemPageFree(pv, PAGE_SIZE); 72 72 #endif 73 73 } … … 148 148 #else 149 149 150 RTMemPageFree(pu8 );150 RTMemPageFree(pu8, cb); 151 151 152 152 #endif -
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceClipboard-os2.cpp
r21218 r28317 423 423 */ 424 424 uint32_t cb = _4K; 425 int rc = VERR_NO_MEMORY; 426 void *pv = RTMemPageAllocZ(cb); 425 uint32_t cbAllocated = cb; 426 int rc = VERR_NO_MEMORY; 427 void *pv = RTMemPageAllocZ(cbAllocated); 427 428 if (pv) 428 429 { … … 431 432 if (rc == VINF_BUFFER_OVERFLOW) 432 433 { 433 RTMemPageFree(pv );434 cb = RT_ALIGN_32(cb, PAGE_SIZE);435 pv = RTMemPageAllocZ(cb );434 RTMemPageFree(pv, cbAllocated); 435 cbAllocated = cb = RT_ALIGN_32(cb, PAGE_SIZE); 436 pv = RTMemPageAllocZ(cbAllocated); 436 437 rc = VbglR3ClipboardReadData(g_u32ClientId, fFormat, pv, cb, &cb); 437 438 } 438 439 if (RT_FAILURE(rc)) 439 RTMemPageFree(pv );440 RTMemPageFree(pv, cbAllocated); 440 441 } 441 442 if (RT_SUCCESS(rc)) … … 458 459 } 459 460 } 460 RTMemPageFree(pv );461 RTMemPageFree(pv, cbAllocated); 461 462 } 462 463 else
Note:
See TracChangeset
for help on using the changeset viewer.