diff options
author | Martin Szulecki | 2009-07-10 19:01:09 +0200 |
---|---|---|
committer | Martin Szulecki | 2009-07-10 19:01:09 +0200 |
commit | 5d047fd1e514e098308430fb59ba335b8ae3d385 (patch) | |
tree | a98fda5565ff9709988d28a3f8f82a5aa1848ee6 /dev | |
parent | 62a6f558ac7ca7a9b83c2ed810929732c02bbc9d (diff) | |
download | libimobiledevice-5d047fd1e514e098308430fb59ba335b8ae3d385.tar.gz libimobiledevice-5d047fd1e514e098308430fb59ba335b8ae3d385.tar.bz2 |
Use new plist_copy instead of serialization workaround in lockdownd_et_value()
Diffstat (limited to 'dev')
-rw-r--r-- | dev/lckdclient.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/dev/lckdclient.c b/dev/lckdclient.c index e197002..e7ad962 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c @@ -74,19 +74,20 @@ int main(int argc, char *argv[]) loop = FALSE; if (!strcmp(*args, "get") && len >= 2) { - plist_t *value = NULL; + plist_t value = NULL; if (IPHONE_E_SUCCESS == lockdownd_get_value(client, len == 3 ? *(args + 1):NULL, len == 3 ? *(args + 2):*(args + 1), &value)) { char *xml = NULL; uint32_t length; plist_to_xml(value, &xml, &length); printf("Success : value = %s\n", xml); - free(xml); - free(value); } else printf("Error\n"); + + if (value) + plist_free(value); } if (!strcmp(*args, "start") && len == 2) { |