summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-09-22 01:08:05 +0200
committerGravatar Nikias Bassen2013-09-22 01:08:05 +0200
commit0e9f962f32714ffc3d5ce79b95dc130cf4ed5bef (patch)
treef04e69a80f5bbb46d655020026996f8cfd71e879 /tools
parent6d12c752a837f7709ea22d7975577201d5e5cafe (diff)
downloadlibimobiledevice-0e9f962f32714ffc3d5ce79b95dc130cf4ed5bef.tar.gz
libimobiledevice-0e9f962f32714ffc3d5ce79b95dc130cf4ed5bef.tar.bz2
idevicebackup2: fix possible crash due to use-after-free
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicebackup2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/idevicebackup2.c b/tools/idevicebackup2.c
index b62a77b..ce4ed23 100644
--- a/tools/idevicebackup2.c
+++ b/tools/idevicebackup2.c
@@ -1662,6 +1662,7 @@ int main(int argc, char *argv[])
plist_dict_insert_item(opts, "CloudBackupState", plist_new_bool(cmd & CMD_FLAG_ENABLE_CLOUD_BACKUP ? 1: 0));
err = mobilebackup2_send_request(mobilebackup2, "EnableCloudBackup", udid, source_udid, opts);
plist_free(opts);
+ opts = NULL;
if (err != MOBILEBACKUP2_E_SUCCESS) {
printf("Error setting cloud backup state on device, error code %d\n", err);
cmd = CMD_LEAVE;