mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
qemu-usb: reset completion pointer
Reset the completion pointer to prevent a double free in case the packet is processed during ISOC IN request handling. Fixes #4041.
This commit is contained in:
parent
c03534e355
commit
42f3d2eccd
@ -579,6 +579,8 @@ struct Usb_host_device : List<Usb_host_device>::Element
|
||||
if (packet.completion) {
|
||||
dynamic_cast<Completion *>(packet.completion)->free();
|
||||
}
|
||||
/* make sure we free the completion only once! */
|
||||
packet.completion = nullptr;
|
||||
}
|
||||
|
||||
Completion *find_valid_completion(USBPacket *p)
|
||||
|
Loading…
Reference in New Issue
Block a user