diff options
author | Nikias Bassen | 2010-06-04 14:06:26 +0200 |
---|---|---|
committer | Nikias Bassen | 2010-06-04 14:06:26 +0200 |
commit | 2169750afea6e8a50da249a1def1112b95d3003e (patch) | |
tree | 311ff25681ac3151d4624fc09f5f4873497b9851 /src/lockdown.c | |
parent | 837d5b0f5a401389802bddb468372a9bcbd418a0 (diff) | |
download | libimobiledevice-2169750afea6e8a50da249a1def1112b95d3003e.tar.gz libimobiledevice-2169750afea6e8a50da249a1def1112b95d3003e.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.
Diffstat (limited to 'src/lockdown.c')
-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 ab49a6a..edd47e5 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1442,7 +1442,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); |