diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/idevice.c | 2 | ||||
| -rw-r--r-- | src/lockdown.c | 1 | ||||
| -rw-r--r-- | src/property_list_service.c | 3 | ||||
| -rw-r--r-- | src/service.c | 3 |
4 files changed, 9 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 | } |
diff --git a/src/lockdown.c b/src/lockdown.c index c2e3654..60fbf0c 100644 --- a/src/lockdown.c +++ b/src/lockdown.c | |||
| @@ -241,6 +241,7 @@ static lockdownd_error_t lockdownd_client_free_simple(lockdownd_client_t client) | |||
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | free(client); | 243 | free(client); |
| 244 | client = NULL; | ||
| 244 | 245 | ||
| 245 | return ret; | 246 | return ret; |
| 246 | } | 247 | } |
diff --git a/src/property_list_service.c b/src/property_list_service.c index b8d4b93..3f2e6c3 100644 --- a/src/property_list_service.c +++ b/src/property_list_service.c | |||
| @@ -101,7 +101,10 @@ property_list_service_error_t property_list_service_client_free(property_list_se | |||
| 101 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; | 101 | return PROPERTY_LIST_SERVICE_E_INVALID_ARG; |
| 102 | 102 | ||
| 103 | property_list_service_error_t err = service_to_property_list_service_error(service_client_free(client->parent)); | 103 | property_list_service_error_t err = service_to_property_list_service_error(service_client_free(client->parent)); |
| 104 | |||
| 104 | free(client); | 105 | free(client); |
| 106 | client = NULL; | ||
| 107 | |||
| 105 | return err; | 108 | return err; |
| 106 | } | 109 | } |
| 107 | 110 | ||
diff --git a/src/service.c b/src/service.c index 5bc7aea..e8444b8 100644 --- a/src/service.c +++ b/src/service.c | |||
| @@ -157,7 +157,10 @@ service_error_t service_client_free(service_client_t client) | |||
| 157 | return SERVICE_E_INVALID_ARG; | 157 | return SERVICE_E_INVALID_ARG; |
| 158 | 158 | ||
| 159 | service_error_t err = idevice_to_service_error(idevice_disconnect(client->connection)); | 159 | service_error_t err = idevice_to_service_error(idevice_disconnect(client->connection)); |
| 160 | |||
| 160 | free(client); | 161 | free(client); |
| 162 | client = NULL; | ||
| 163 | |||
| 161 | return err; | 164 | return err; |
| 162 | } | 165 | } |
| 163 | 166 | ||
