diff options
Diffstat (limited to 'iphone.c')
| -rw-r--r-- | iphone.c | 8 |
1 files changed, 5 insertions, 3 deletions
| @@ -427,9 +427,11 @@ iphone_error_t iphone_free_device(iphone_device_t device) | |||
| 427 | return IPHONE_E_INVALID_ARG; | 427 | return IPHONE_E_INVALID_ARG; |
| 428 | iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; | 428 | iphone_error_t ret = IPHONE_E_UNKNOWN_ERROR; |
| 429 | 429 | ||
| 430 | do { | 430 | if (device->device) { |
| 431 | bytes = usb_bulk_read(device->device, BULKIN, buf, 512, 800); | 431 | do { |
| 432 | } while (bytes > 0); | 432 | bytes = usb_bulk_read(device->device, BULKIN, buf, 512, 800); |
| 433 | } while (bytes > 0); | ||
| 434 | } | ||
| 433 | 435 | ||
| 434 | if (device->buffer) { | 436 | if (device->buffer) { |
| 435 | free(device->buffer); | 437 | free(device->buffer); |
