- Timestamp:
- Apr 10, 2023 6:52:44 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/USB/VUSBUrbPool.cpp
r98103 r99368 163 163 RTListNodeRemove(&pIt->NdFree); 164 164 ASMAtomicDecU32(&pUrbPool->cUrbsInPool); 165 pIt->cbAllocated = 0; 166 pIt->Urb.u32Magic = 0; 167 pIt->Urb.enmState = VUSBURBSTATE_INVALID; 165 168 RTMemFree(pIt); 166 169 } … … 185 188 pHdr->cAge = 0; 186 189 ASMAtomicIncU32(&pUrbPool->cUrbsInPool); 190 } 191 else 192 { 193 /* Paranoia: Clear memory that's part of the guest data buffer now 194 * but wasn't before. See @bugref{10410}. 195 */ 196 if (cbData > pHdr->Urb.cbData) 197 { 198 memset(&pHdr->Urb.abData[pHdr->Urb.cbData], 0, cbData - pHdr->Urb.cbData); 199 } 187 200 } 188 201 RTCritSectLeave(&pUrbPool->CritSectPool); … … 230 243 { 231 244 ASMAtomicDecU32(&pUrbPool->cUrbsInPool); 245 pHdr->cbAllocated = 0; 246 pHdr->Urb.u32Magic = 0; 247 pHdr->Urb.enmState = VUSBURBSTATE_INVALID; 232 248 RTMemFree(pHdr); 233 249 }
Note:
See TracChangeset
for help on using the changeset viewer.