summaryrefslogtreecommitdiffstats
path: root/src/restore.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-11-19 22:43:10 +0100
committerGravatar Martin Szulecki2013-11-19 22:43:10 +0100
commit5095a5574964182c86cb3060b99a6f84bb441f6d (patch)
tree88aa03c22f1d9f8c0a46209d7da20c86863699db /src/restore.c
parent40de1e2641326a7ab6ba00c2a54e392e17530895 (diff)
downloadidevicerestore-5095a5574964182c86cb3060b99a6f84bb441f6d.tar.gz
idevicerestore-5095a5574964182c86cb3060b99a6f84bb441f6d.tar.bz2
restore: Fix baseband request creation order for proper error checking
Diffstat (limited to 'src/restore.c')
-rw-r--r--src/restore.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/restore.c b/src/restore.c
index eac2b06..845a670 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -1329,22 +1329,23 @@ int restore_send_baseband_data(restored_client_t restore, struct idevicerestore_
/* create baseband request */
plist_t request = tss_request_new(NULL);
- tss_request_add_baseband_tags_from_manifest(request, build_identity, NULL);
- tss_request_add_baseband_tags(request, parameters);
-
if (request == NULL) {
error("ERROR: Unable to create Baseband TSS request\n");
plist_free(parameters);
return -1;
}
- // send Baseband TSS request
+ /* add baseband parameters */
+ tss_request_add_baseband_tags_from_manifest(request, build_identity, NULL);
+ tss_request_add_baseband_tags(request, parameters);
+
if (idevicerestore_debug)
debug_plist(request);
info("Sending Baseband TSS request...\n");
response = tss_request_send(request, client->tss_url);
plist_free(request);
+ plist_free(parameters);
if (response == NULL) {
error("ERROR: Unable to fetch Baseband TSS\n");
return -1;