diff options
author | Nikias Bassen | 2022-09-14 12:22:07 +0200 |
---|---|---|
committer | Nikias Bassen | 2022-09-14 12:22:07 +0200 |
commit | ef7cf8eb545d9ed3fb1f351376dec71608d0127b (patch) | |
tree | 275e57523aaa44c62cc68ded6d3365b7c749474f /src | |
parent | b5ce44449216195d02df386a1799efdaffe45a67 (diff) | |
download | libimobiledevice-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.
Diffstat (limited to 'src')
-rw-r--r-- | src/restore.c | 2 |
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; } |