summaryrefslogtreecommitdiffstats
path: root/src/idevice.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/idevice.c')
-rw-r--r--src/idevice.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c
index f0d89df..c605da3 100644
--- a/src/idevice.c
+++ b/src/idevice.c
@@ -238,6 +238,7 @@ idevice_error_t idevice_connect(idevice_t device, uint16_t port, idevice_connect
new_connection->type = CONNECTION_USBMUXD;
new_connection->data = (void*)(long)sfd;
new_connection->ssl_data = NULL;
+ idevice_get_udid(device, &new_connection->udid);
*connection = new_connection;
return IDEVICE_E_SUCCESS;
} else {
@@ -270,7 +271,12 @@ idevice_error_t idevice_disconnect(idevice_connection_t connection)
} else {
debug_info("Unknown connection type %d", connection->type);
}
+
+ if (connection->udid)
+ free(connection->udid);
+
free(connection);
+
return result;
}