mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-11 20:01:48 +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) {
|
if (packet.completion) {
|
||||||
dynamic_cast<Completion *>(packet.completion)->free();
|
dynamic_cast<Completion *>(packet.completion)->free();
|
||||||
}
|
}
|
||||||
|
/* make sure we free the completion only once! */
|
||||||
|
packet.completion = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
Completion *find_valid_completion(USBPacket *p)
|
Completion *find_valid_completion(USBPacket *p)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user