Ticket #38: session-release.diff
File session-release.diff, 1.5 KB (added by , 8 years ago) |
---|
-
HostDrivers/Support/os2/SUPDrv-os2.cpp
222 222 /* 223 223 * Close the session. 224 224 */ 225 supdrvSessionRelease(pSession); 225 if (pSession) 226 supdrvSessionRelease(pSession); 227 226 228 return 0; 227 229 } 228 230 … … 245 247 && ( pSession->sfn != sfn 246 248 || pSession->Process != Process)); 247 249 248 if (RT_LIKELY(pSession))249 supdrvSessionRetain(pSession);250 250 } 251 251 RTSpinlockRelease(g_Spinlock); 252 if ( RT_UNLIKELY(!pSession))252 if (!pSession) 253 253 { 254 254 OSDBGPRINT(("VBoxDrvIoctl: WHUT?!? pSession == NULL! This must be a mistake... pid=%d\n", (int)Process)); 255 255 return VERR_INVALID_PARAMETER; … … 259 259 * Dispatch the fast IOCtl. 260 260 */ 261 261 supdrvIOCtlFast(iFunction, 0, &g_DevExt, pSession); 262 supdrvSessionRelease(pSession);263 262 return 0; 264 263 } 265 264 … … 282 281 while ( pSession 283 282 && ( pSession->sfn != sfn 284 283 || pSession->Process != Process)); 285 286 if (RT_LIKELY(pSession))287 supdrvSessionRetain(pSession);288 284 } 289 285 RTSpinlockRelease(g_Spinlock); 290 286 if (!pSession) … … 359 355 else 360 356 rc = VERR_NOT_SUPPORTED; 361 357 362 supdrvSessionRelease(pSession);363 358 Log2(("VBoxDrvIOCtl: returns %d\n", rc)); 364 359 return rc; 365 360 }