Changeset 219 in vbox
- Timestamp:
- Jan 22, 2007 12:36:58 AM (18 years ago)
- svn:sync-xref-src-repo-rev:
- 17711
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/darwin/SUPDrv-darwin.c
r216 r219 378 378 { 379 379 int rc; 380 void *pvPageBuf = NULL; 380 381 void *pvBuf = NULL; 381 382 int cbBuf = 0; … … 401 402 MALLOC(pvBuf, void *, cbBuf, M_TEMP, M_WAITOK); 402 403 if (pvBuf == NULL) 404 pvPageBuf = pvBuf = IOMallocAligned(cbBuf, 8); 405 if (pvBuf == NULL) 403 406 { 404 407 dprintf(("VBoxSupDrvIOCtl: failed to allocate buffer of %d bytes.\n", cbBuf)); … … 409 412 { 410 413 dprintf(("VBoxSupDrvIOCtl: copyin(%p,,%d) failed.\n", pArgs->pvIn, cbBuf)); 411 FREE(pvBuf, M_TEMP); 414 if (pvPageBuf) 415 IOFreeAligned(pvPageBuf, cbBuf); 416 else 417 FREE(pvBuf, M_TEMP); 412 418 return rc; 413 419 } … … 447 453 } 448 454 449 if (pvBuf) 455 if (pvPageBuf) 456 IOFreeAligned(pvPageBuf, cbBuf); 457 else if (pvBuf) 450 458 FREE(pvBuf, M_TEMP); 451 459
Note:
See TracChangeset
for help on using the changeset viewer.