diff options
| author | 2013-03-14 03:09:14 +0100 | |
|---|---|---|
| committer | 2013-03-14 03:09:14 +0100 | |
| commit | 4222bc1b880d6535462e3b5ba5431809a3c5fddc (patch) | |
| tree | b664bbdfe96d162930b2719ec920cd149684b0ed /dev/afccheck.c | |
| parent | 23abc8303b8cad9251cd4ea4b5fa5af28e5f0b24 (diff) | |
| download | libimobiledevice-4222bc1b880d6535462e3b5ba5431809a3c5fddc.tar.gz libimobiledevice-4222bc1b880d6535462e3b5ba5431809a3c5fddc.tar.bz2 | |
global: make sure to check service before checking service->port to prevent crashes
Diffstat (limited to 'dev/afccheck.c')
| -rw-r--r-- | dev/afccheck.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index ead0ca0..d7ee7d1 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c | |||
| @@ -111,7 +111,7 @@ int main(int argc, char *argv[]) | |||
| 111 | return 1; | 111 | return 1; |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | if (LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, "com.apple.afc", &service) && !service->port) { | 114 | if (LOCKDOWN_E_SUCCESS != lockdownd_start_service(client, "com.apple.afc", &service) || !service || !service->port) { |
| 115 | lockdownd_client_free(client); | 115 | lockdownd_client_free(client); |
| 116 | idevice_free(phone); | 116 | idevice_free(phone); |
| 117 | fprintf(stderr, "Something went wrong when starting AFC."); | 117 | fprintf(stderr, "Something went wrong when starting AFC."); |
