Changeset 15842 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jan 7, 2009 4:41:48 PM (16 years ago)
- Location:
- trunk/src/VBox/Devices/Network
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r15757 r15842 547 547 * by handle lookup/freeing. 548 548 * 549 * @returns false in case the pIf was deleted as a result of this call, false otherwise549 * @returns true if destroyed, false if not. 550 550 * @param pIf The interface instance. 551 551 * @param pSession The current session. … … 555 555 int rc = SUPR0ObjRelease(pIf->pvObj, pSession); 556 556 AssertRC(rc); 557 if(!pIf->pvObj) 558 { 559 RTMemFree(pIf); 560 return false; 561 } 562 return true; 557 return rc == VINF_OBJECT_DESTROYED; 563 558 } 564 559 … … 3053 3048 if (!pIf->fDestroying) 3054 3049 { 3055 if (!intnetR0IfRelease(pIf, pSession))3050 if (!intnetR0IfRelease(pIf, pSession)) 3056 3051 rc = VERR_SEM_DESTROYED; 3057 3052 } … … 3113 3108 RTSemEventSignal(pIf->Event); 3114 3109 3110 void *pvObj = pIf->pvObj; 3115 3111 intnetR0IfRelease(pIf, pSession); /* (RTHandleTableFreeWithCtx) */ 3116 3112 3117 intnetR0IfRelease(pIf, pSession); 3118 3119 int rc = VINF_SUCCESS; 3113 int rc = SUPR0ObjRelease(pvObj, pSession); 3120 3114 LogFlow(("INTNETR0IfClose: returns %Rrc\n", rc)); 3121 3115 return rc; … … 3172 3166 } 3173 3167 3174 3168 /* 3175 3169 * If we've got a network deactivate and unlink ourselves from it. 3176 3170 * Because of cleanup order we might be an orphan now. … … 3265 3259 */ 3266 3260 pIf->pvObj = NULL; 3267 /* 3268 * we are freeing it in 3269 * intnetR0IfRelease 3270 * RTMemFree(pIf); 3271 */ 3261 RTMemFree(pIf); 3272 3262 } 3273 3263 … … 3396 3386 } 3397 3387 3398 intnetR0IfRelease(pIf, pSession);3388 SUPR0ObjRelease(pIf->pvObj, pSession); 3399 3389 LogFlow(("intnetR0NetworkCreateIf: returns %Rrc\n", rc)); 3400 3390 return rc; -
trunk/src/VBox/Devices/Network/testcase/tstIntNetR0.cpp
r15505 r15842 161 161 pRef->pfnDestructor(pRef, pRef->pvUser1, pRef->pvUser2); 162 162 RTMemFree(pRef); 163 return VINF_OBJECT_DESTROYED; 163 164 } 164 165 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.