Changeset 15757 in vbox
- Timestamp:
- Dec 25, 2008 2:13:46 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/SrvIntNetR0.cpp
r15643 r15757 547 547 * by handle lookup/freeing. 548 548 * 549 * @returns VBox status code, can assume success in most situations.549 * @returns false in case the pIf was deleted as a result of this call, false otherwise 550 550 * @param pIf The interface instance. 551 551 * @param pSession The current session. 552 552 */ 553 DECLINLINE( void) intnetR0IfRelease(PINTNETIF pIf, PSUPDRVSESSION pSession)553 DECLINLINE(bool) intnetR0IfRelease(PINTNETIF pIf, PSUPDRVSESSION pSession) 554 554 { 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 563 } 558 564 … … 3047 3053 if (!pIf->fDestroying) 3048 3054 { 3049 intnetR0IfRelease(pIf, pSession); 3050 if (pIf->hIf != hIf) 3055 if(!intnetR0IfRelease(pIf, pSession)) 3051 3056 rc = VERR_SEM_DESTROYED; 3052 3057 } … … 3108 3113 RTSemEventSignal(pIf->Event); 3109 3114 3110 void *pvObj = pIf->pvObj;3111 3115 intnetR0IfRelease(pIf, pSession); /* (RTHandleTableFreeWithCtx) */ 3112 3116 3113 int rc = SUPR0ObjRelease(pvObj, pSession); 3117 intnetR0IfRelease(pIf, pSession); 3118 3119 int rc = VINF_SUCCESS; 3114 3120 LogFlow(("INTNETR0IfClose: returns %Rrc\n", rc)); 3115 3121 return rc; … … 3166 3172 } 3167 3173 3168 /*3174 /* 3169 3175 * If we've got a network deactivate and unlink ourselves from it. 3170 3176 * Because of cleanup order we might be an orphan now. … … 3259 3265 */ 3260 3266 pIf->pvObj = NULL; 3261 RTMemFree(pIf); 3267 /* 3268 * we are freeing it in 3269 * intnetR0IfRelease 3270 * RTMemFree(pIf); 3271 */ 3262 3272 } 3263 3273 … … 3386 3396 } 3387 3397 3388 SUPR0ObjRelease(pIf->pvObj, pSession);3398 intnetR0IfRelease(pIf, pSession); 3389 3399 LogFlow(("intnetR0NetworkCreateIf: returns %Rrc\n", rc)); 3390 3400 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.