summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Petr Uzel2010-04-11 10:52:15 +0200
committerGravatar Martin Szulecki2010-04-11 15:54:33 +0200
commitc5f65cb7c5acc32b93c7f89ed3bdc16ed2f87eaf (patch)
tree6a539654aae912b2452cff202cf707a77e497a70
parent64de4333979b8ad46967638fd45b5037b1f5d266 (diff)
downloadlibimobiledevice-c5f65cb7c5acc32b93c7f89ed3bdc16ed2f87eaf.tar.gz
libimobiledevice-c5f65cb7c5acc32b93c7f89ed3bdc16ed2f87eaf.tar.bz2
plug memory leaks in generate_pair_record_plist()
-rw-r--r--src/lockdown.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 60b57b1..bc04fe9 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -786,6 +786,13 @@ static lockdownd_error_t generate_pair_record_plist(gnutls_datum_t public_key, c
if (!host_id)
free(host_id_loc);
+ if (device_cert.data)
+ free(device_cert.data);
+ if (host_cert.data)
+ free(host_cert.data);
+ if (root_cert.data)
+ free(root_cert.data);
+
return ret;
}