Changeset 15987 in vbox for trunk/src/VBox/Additions/linux
- Timestamp:
- Jan 16, 2009 10:36:30 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/module/vboxmod.c
r15720 r15987 480 480 /** Unlock R3 memory after the HGCM call. Copied from HGCMInternal.cpp and 481 481 * SysHlp.cpp */ 482 static void vboxadd_unbuffer_hgcm_parms(void **ppvCtx, VBoxGuestHGCMCallInfo *pCallInfo) 483 { 482 static int vboxadd_unbuffer_hgcm_parms(void **ppvCtx, VBoxGuestHGCMCallInfo *pCallInfo) 483 { 484 int rc = 0; 484 485 unsigned iParm; 485 486 /* Unlock user buffers. */ … … 495 496 { 496 497 hgcm_jump_buffer *MemObj = (hgcm_jump_buffer *)ppvCtx[iParm]; 497 #ifdef VBOX_STRICT 498 int rc = vboxadd_hgcm_free_buffer(MemObj); 499 Assert(rc >= 0); /* vboxadd_hgcm_unbuffer_user logs this. */ 500 #else 501 vboxadd_hgcm_free_buffer(MemObj); 502 #endif 498 int rc2 = vboxadd_hgcm_free_buffer(MemObj); 499 if (rc >= 0 && rc2 < 0) 500 rc = rc2; /* Report the first error. */ 503 501 } 504 502 } 505 503 else 506 Assert(!ppvCtx[iParm]); 507 } 504 if (ppvCtx[iParm] != NULL) 505 { 506 AssertFailed(); 507 rc = -EOVERFLOW; /* Something unlikely to turn up elsewhere so 508 * we can see where it's coming from. */ 509 } 510 } 511 return rc; 508 512 } 509 513 … … 557 561 } 558 562 if (haveParms) 559 vboxadd_unbuffer_hgcm_parms(apvCtx, pInfo); 563 { 564 int rc2 = vboxadd_unbuffer_hgcm_parms(apvCtx, pInfo); 565 if (rc >= 0 && rc2 < 0) 566 rc = rc2; 567 } 560 568 if (pInfo != NULL) 561 569 kfree(pInfo); … … 614 622 } 615 623 if (haveParms) 616 vboxadd_unbuffer_hgcm_parms(apvCtx, &pInfo->info); 624 { 625 int rc2 = vboxadd_unbuffer_hgcm_parms(apvCtx, &pInfo->info); 626 if (rc >= 0 && rc2 < 0) 627 rc = rc2; 628 } 617 629 if (pInfo != NULL) 618 630 kfree(pInfo);
Note:
See TracChangeset
for help on using the changeset viewer.