summaryrefslogtreecommitdiffstats
path: root/dev/lckdclient.c
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2009-07-10 19:01:09 +0200
committerGravatar Matt Colyer2009-07-18 10:39:42 -0700
commit5fa071717799ee2424c41b62360c7122b104fefb (patch)
tree51896d237e6768902d33c776204530bf78d60fff /dev/lckdclient.c
parentb8ce722ffaeab22e141e18907c46bbed4659d857 (diff)
downloadlibimobiledevice-5fa071717799ee2424c41b62360c7122b104fefb.tar.gz
libimobiledevice-5fa071717799ee2424c41b62360c7122b104fefb.tar.bz2
Use new plist_copy instead of serialization workaround in lockdownd_et_value()
Diffstat (limited to 'dev/lckdclient.c')
-rw-r--r--dev/lckdclient.c7
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) {