diff options
author | Nikias Bassen | 2015-09-24 20:22:15 +0200 |
---|---|---|
committer | Nikias Bassen | 2015-09-24 20:22:15 +0200 |
commit | eb879c72e53585d55abbbf811d799b7ef43d1c02 (patch) | |
tree | 7e4b58d71bdcf2b654bf58305a4349aa229a7147 /src/restore.c | |
parent | e658bf5278c22df809a8665242a304fea5234a30 (diff) | |
download | idevicerestore-eb879c72e53585d55abbbf811d799b7ef43d1c02.tar.gz idevicerestore-eb879c72e53585d55abbbf811d799b7ef43d1c02.tar.bz2 |
Revise several changes from commit 245bc9b6510a8900c69c2fd543434bae1bc6ca6a
In very rare cases the changes introduced by commit can actually cause
an invalid free. Reverted those changes. Also, plist_free() will check
for NULL before doing anything, so an extra check for that is not needed.
Diffstat (limited to 'src/restore.c')
-rw-r--r-- | src/restore.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/restore.c b/src/restore.c index 3abf082..c81a7e4 100644 --- a/src/restore.c +++ b/src/restore.c @@ -779,7 +779,6 @@ int restore_send_kernelcache(restored_client_t restore, struct idevicerestore_cl if (!path) { if (build_identity_get_component_path(build_identity, "KernelCache", &path) < 0) { error("ERROR: Unable to find kernelcache path\n"); - free(path); return -1; } } @@ -848,7 +847,6 @@ int restore_send_nor(restored_client_t restore, struct idevicerestore_client_t* if (llb_path == NULL) { if (build_identity_get_component_path(build_identity, "LLB", &llb_path) < 0) { error("ERROR: Unable to get component path for LLB\n"); - free(llb_path); return -1; } } @@ -1913,10 +1911,8 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit } free(type); - if (message) { - plist_free(message); - message = NULL; - } + plist_free(message); + message = NULL; } restore_client_free(client); |