- Timestamp:
- Sep 21, 2008 4:14:59 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r12620 r12621 663 663 if (pState->CurType == kPromiscStream) 664 664 { 665 /* 666 * Careful; Use RTMemAllocZ here to zero-out uninitialized fields. 667 */ 668 vboxnetflt_promisc_stream_t *pPromiscStream = RTMemAllocZ(sizeof(vboxnetflt_promisc_stream_t)); 665 vboxnetflt_promisc_stream_t *pPromiscStream = RTMemAlloc(sizeof(vboxnetflt_promisc_stream_t)); 669 666 if (RT_UNLIKELY(!pPromiscStream)) 670 667 { … … 678 675 pPromiscStream->fRawMode = false; 679 676 pPromiscStream->ModeReqId = 0; 677 pPromiscStream->pHead = NULL; 678 pPromiscStream->pTail = NULL; 679 pPromiscStream->cLoopback = 0; 680 680 pStream = (vboxnetflt_stream_t *)pPromiscStream; 681 681 } … … 1787 1787 pCur = pNext; 1788 1788 } 1789 pPromiscStream->pHead = NULL; 1790 pPromiscStream->pTail = NULL; 1789 1791 pPromiscStream->cLoopback = 0; 1790 1792 } … … 2420 2422 2421 2423 pPromiscStream->pHead = pCur; 2422 pPromiscStream->pTail = p PromiscStream->pHead;2424 pPromiscStream->pTail = pCur; 2423 2425 pPromiscStream->cLoopback++; 2424 2426 … … 2438 2440 break; 2439 2441 } 2442 2443 Assert(pPromiscStream->pTail); 2440 2444 2441 2445 pCur = RTMemAllocZ(sizeof(VBOXNETFLTPACKETID)); … … 2460 2464 * Maximum loopback queue size reached. Re-use head as tail. 2461 2465 */ 2462 PVBOXNETFLTPACKETID pCur = pPromiscStream->pHead; 2466 Assert(pPromiscStream->pHead); 2467 Assert(pPromiscStream->pTail); 2468 2469 pCur = pPromiscStream->pHead; 2463 2470 pPromiscStream->pHead = pPromiscStream->pHead->pNext; 2464 2471 pPromiscStream->pTail->pNext = pCur; … … 2543 2550 */ 2544 2551 pCur->cbPacket = 0; 2545 pPromiscStream->cLoopback--;2546 2552 LogFlow((DEVICE_NAME ":vboxNetFltSolarisIsOurMBlk found packet %p cLoopback=%d\n", pMsg, pPromiscStream->cLoopback)); 2547 2553 return true; … … 2956 2962 { 2957 2963 vboxnetflt_promisc_stream_t *pPromiscStream = pThis->u.s.pvPromiscStream; 2964 if (!pPromiscStream) 2965 return VERR_INVALID_POINTER; 2966 2958 2967 queue_t *pPromiscWriteQueue = WR(pPromiscStream->Stream.pReadQueue); 2959 2968
Note:
See TracChangeset
for help on using the changeset viewer.