summaryrefslogtreecommitdiffstats
path: root/src/iphone.c
diff options
context:
space:
mode:
authorGravatar Jonathan Beck2008-08-31 18:31:21 +0200
committerGravatar Jonathan Beck2008-08-31 19:33:19 +0200
commit8333ca944cc56b4da1ab418c0b890f96f5135210 (patch)
tree63792ef9d2786d23b53e47dd8af9f9055c1a6bef /src/iphone.c
parent86f61988990daa30c8564e2b26666dd442bd6e65 (diff)
downloadlibimobiledevice-8333ca944cc56b4da1ab418c0b890f96f5135210.tar.gz
libimobiledevice-8333ca944cc56b4da1ab418c0b890f96f5135210.tar.bz2
use new function signature and few bugfixes.
Diffstat (limited to 'src/iphone.c')
-rw-r--r--src/iphone.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/iphone.c b/src/iphone.c
index f5bc206..68963fe 100644
--- a/src/iphone.c
+++ b/src/iphone.c
@@ -140,14 +140,14 @@ iphone_error_t iphone_free_device ( iphone_device_t device ) {
if (device->buffer) {
free(device->buffer);
- if (device->device) {
- usb_release_interface(device->device, 1);
- usb_reset(device->device);
- usb_close(device->device);
- ret = IPHONE_E_SUCCESS;
- }
- free(device);
}
+ if (device->device) {
+ usb_release_interface(device->device, 1);
+ usb_reset(device->device);
+ usb_close(device->device);
+ ret = IPHONE_E_SUCCESS;
+ }
+ free(device);
return ret;
}