summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicepair.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/idevicepair.c b/tools/idevicepair.c
index 77c46b7..be1f373 100644
--- a/tools/idevicepair.c
+++ b/tools/idevicepair.c
@@ -192,12 +192,13 @@ int main(int argc, char **argv)
192 192
193 if (udid) { 193 if (udid) {
194 ret = idevice_new(&device, udid); 194 ret = idevice_new(&device, udid);
195 free(udid);
196 udid = NULL;
197 if (ret != IDEVICE_E_SUCCESS) { 195 if (ret != IDEVICE_E_SUCCESS) {
198 printf("No device found with udid %s, is it plugged in?\n", udid); 196 printf("No device found with udid %s, is it plugged in?\n", udid);
197 free(udid);
199 return EXIT_FAILURE; 198 return EXIT_FAILURE;
200 } 199 }
200 free(udid);
201 udid = NULL;
201 } else { 202 } else {
202 ret = idevice_new(&device, NULL); 203 ret = idevice_new(&device, NULL);
203 if (ret != IDEVICE_E_SUCCESS) { 204 if (ret != IDEVICE_E_SUCCESS) {