summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Petr Uzel2010-04-11 10:52:15 +0200
committerGravatar Martin Szulecki2010-04-11 15:08:03 +0200
commit513160b362e57d20e30904be459304a0c29603c7 (patch)
treeb895e8e646e1a157ef9604ad9688b9e08a87ea24
parent1b8f638e160bb06eb453e5ab8e9632575921bfcc (diff)
downloadlibimobiledevice-513160b362e57d20e30904be459304a0c29603c7.tar.gz
libimobiledevice-513160b362e57d20e30904be459304a0c29603c7.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;
}