sync.c: Do not free an incompleted transfer
Before this patch the code in sync.c would free an incomplete transfer
when libusb_handle_events_completed exits with an error twice in a row.
But we should never free an incomplete transfer, otherwise we may end up
referencing free-ed memory later on.
This patch simply logs an error and keeps on trying until the transfer
completes.
Note that if libusb_handle_events_completed keeps throwing an error the
entire time, without ever completing the transfer, this patch effectively
replaces a potential crash / unspecified behavior, with an endless loop
and logging a ton of errors making clear what is going on.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>