diff --git a/repos/libports/src/lib/qemu-usb/host.cc b/repos/libports/src/lib/qemu-usb/host.cc index 5889b2a71b..9c1eaae3d6 100644 --- a/repos/libports/src/lib/qemu-usb/host.cc +++ b/repos/libports/src/lib/qemu-usb/host.cc @@ -579,6 +579,8 @@ struct Usb_host_device : List::Element if (packet.completion) { dynamic_cast(packet.completion)->free(); } + /* make sure we free the completion only once! */ + packet.completion = nullptr; } Completion *find_valid_completion(USBPacket *p)