summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2022-09-14 12:22:07 +0200
committerGravatar Nikias Bassen2022-09-14 12:22:07 +0200
commitef7cf8eb545d9ed3fb1f351376dec71608d0127b (patch)
tree275e57523aaa44c62cc68ded6d3365b7c749474f
parentb5ce44449216195d02df386a1799efdaffe45a67 (diff)
downloadlibimobiledevice-ef7cf8eb545d9ed3fb1f351376dec71608d0127b.tar.gz
libimobiledevice-ef7cf8eb545d9ed3fb1f351376dec71608d0127b.tar.bz2
restore: Remove incorrect invocation of free() in restored_get_value
The free would cause a use-after-free when the plist is later freed, which eventually ends up in a crash. Thanks @TrungNguyen1909 for catching this.
-rw-r--r--src/restore.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/restore.c b/src/restore.c
index 591fd16..41bfb9d 100644
--- a/src/restore.c
+++ b/src/restore.c
@@ -287,7 +287,7 @@ LIBIMOBILEDEVICE_API restored_error_t restored_get_value(restored_client_t clien
}
*value = plist_copy(item);
- free(item);
+
return RESTORE_E_SUCCESS;
}