diff options
author | Nikias Bassen | 2010-06-04 14:06:26 +0200 |
---|---|---|
committer | Martin Szulecki | 2010-06-06 16:22:47 +0200 |
commit | 2639fb870dfbf99a4954404bd1b4c25b60b8a7bc (patch) | |
tree | 3017885233ecbe3251f4b8eaba7ea2c3dc08d5c3 | |
parent | f19bce36196fe427b78331dffd3efe230546345c (diff) | |
download | libimobiledevice-2639fb870dfbf99a4954404bd1b4c25b60b8a7bc.tar.gz libimobiledevice-2639fb870dfbf99a4954404bd1b4c25b60b8a7bc.tar.bz2 |
lockdown: correctly handle activation_record parameter in lockdownd_activate
The activation_record was inserted into the request plist and freed at
the end. If the user app then uses plist_free to free the activation
record, it gets an invalid free. By using plist_copy the
activation_record is not touched.
-rw-r--r-- | src/lockdown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 341fbde..49a42e5 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1445,7 +1445,7 @@ lockdownd_error_t lockdownd_activate(lockdownd_client_t client, plist_t activati plist_t dict = plist_new_dict(); plist_dict_add_label(dict, client->label); plist_dict_insert_item(dict,"Request", plist_new_string("Activate")); - plist_dict_insert_item(dict,"ActivationRecord", activation_record); + plist_dict_insert_item(dict,"ActivationRecord", plist_copy(activation_record)); ret = lockdownd_send(client, dict); plist_free(dict); |