From e4bbd0e7d65cc81ccf4ae5d6df6af8077ac70d18 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 8 Jun 2010 21:34:35 +0200 Subject: Free lockdownd connection early for both backup and restore commands --- tools/idevicebackup.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'tools/idevicebackup.c') diff --git a/tools/idevicebackup.c b/tools/idevicebackup.c index 8f47433..6626020 100644 --- a/tools/idevicebackup.c +++ b/tools/idevicebackup.c @@ -857,6 +857,12 @@ int main(int argc, char *argv[]) } } + /* close down the lockdown connection as it is no longer needed */ + if (client) { + lockdownd_client_free(client); + client = NULL; + } + mobilebackup_error_t err; /* Manifest.plist (backup manifest (backup state)) */ @@ -896,12 +902,6 @@ int main(int argc, char *argv[]) plist_free(info_plist); info_plist = NULL; - /* close down the lockdown connection as it is no longer needed */ - if (client) { - lockdownd_client_free(client); - client = NULL; - } - /* create Status.plist with failed status for now */ mobilebackup_write_status(backup_directory, 0); @@ -1288,8 +1288,6 @@ int main(int argc, char *argv[]) printf("ERROR: Could not send BackupMessageRestoreComplete, error code %d\n", err); } /* TODO: close down notification_proxy connection */ - /* close down lockdown connection as it is no longer needed */ - lockdownd_client_free(client); client = NULL; break; case CMD_LEAVE: -- cgit v1.1-32-gdbae