diff options
Diffstat (limited to 'src/idevice.c')
| -rw-r--r-- | src/idevice.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/idevice.c b/src/idevice.c index 3ed2e9f..428f359 100644 --- a/src/idevice.c +++ b/src/idevice.c | |||
| @@ -267,6 +267,7 @@ idevice_error_t idevice_disconnect(idevice_connection_t connection) | |||
| 267 | idevice_error_t result = IDEVICE_E_UNKNOWN_ERROR; | 267 | idevice_error_t result = IDEVICE_E_UNKNOWN_ERROR; |
| 268 | if (connection->type == CONNECTION_USBMUXD) { | 268 | if (connection->type == CONNECTION_USBMUXD) { |
| 269 | usbmuxd_disconnect((int)(long)connection->data); | 269 | usbmuxd_disconnect((int)(long)connection->data); |
| 270 | connection->data = NULL; | ||
| 270 | result = IDEVICE_E_SUCCESS; | 271 | result = IDEVICE_E_SUCCESS; |
| 271 | } else { | 272 | } else { |
| 272 | debug_info("Unknown connection type %d", connection->type); | 273 | debug_info("Unknown connection type %d", connection->type); |
| @@ -276,6 +277,7 @@ idevice_error_t idevice_disconnect(idevice_connection_t connection) | |||
| 276 | free(connection->udid); | 277 | free(connection->udid); |
| 277 | 278 | ||
| 278 | free(connection); | 279 | free(connection); |
| 280 | connection = NULL; | ||
| 279 | 281 | ||
| 280 | return result; | 282 | return result; |
| 281 | } | 283 | } |
