From 2492647074906571045038e1fc95f3c0c0e27ce1 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 17:11:59 +0200 Subject: restore: Plug leak and free USBLog and PanicLog if received --- src/restore.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/restore.c b/src/restore.c index ce50f3f..2bda917 100644 --- a/src/restore.c +++ b/src/restore.c @@ -1425,6 +1425,7 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit if (node && plist_get_node_type(node) == PLIST_STRING) { plist_get_string_val(node, &sval); info("USB log is available:\n%s\n", sval); + free(sval); sval = NULL; } @@ -1432,6 +1433,7 @@ int restore_device(struct idevicerestore_client_t* client, plist_t build_identit if (node && plist_get_node_type(node) == PLIST_STRING) { plist_get_string_val(node, &sval); info("Panic log is available:\n%s\n", sval); + free(sval); sval = NULL; } plist_free(info); -- cgit v1.1-32-gdbae