diff options
Diffstat (limited to 'src/idevice.c')
| -rw-r--r-- | src/idevice.c | 6 |
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 | |||
| 238 | new_connection->type = CONNECTION_USBMUXD; | 238 | new_connection->type = CONNECTION_USBMUXD; |
| 239 | new_connection->data = (void*)(long)sfd; | 239 | new_connection->data = (void*)(long)sfd; |
| 240 | new_connection->ssl_data = NULL; | 240 | new_connection->ssl_data = NULL; |
| 241 | idevice_get_udid(device, &new_connection->udid); | ||
| 241 | *connection = new_connection; | 242 | *connection = new_connection; |
| 242 | return IDEVICE_E_SUCCESS; | 243 | return IDEVICE_E_SUCCESS; |
| 243 | } else { | 244 | } else { |
| @@ -270,7 +271,12 @@ idevice_error_t idevice_disconnect(idevice_connection_t connection) | |||
| 270 | } else { | 271 | } else { |
| 271 | debug_info("Unknown connection type %d", connection->type); | 272 | debug_info("Unknown connection type %d", connection->type); |
| 272 | } | 273 | } |
| 274 | |||
| 275 | if (connection->udid) | ||
| 276 | free(connection->udid); | ||
| 277 | |||
| 273 | free(connection); | 278 | free(connection); |
| 279 | |||
| 274 | return result; | 280 | return result; |
| 275 | } | 281 | } |
| 276 | 282 | ||
