diff options
author | Petr Uzel | 2010-04-11 10:52:16 +0200 |
---|---|---|
committer | Martin Szulecki | 2010-04-11 15:54:43 +0200 |
commit | 1611acb9e716ceb5c644d72e0b1aad0cfe52fcbd (patch) | |
tree | ee91f92a8fd9d6e09480d3de563f3c20d2b6d094 /src | |
parent | c5f65cb7c5acc32b93c7f89ed3bdc16ed2f87eaf (diff) | |
download | libimobiledevice-1611acb9e716ceb5c644d72e0b1aad0cfe52fcbd.tar.gz libimobiledevice-1611acb9e716ceb5c644d72e0b1aad0cfe52fcbd.tar.bz2 |
plug memory leak in lockdownd_gen_pair_cert()
Diffstat (limited to 'src')
-rw-r--r-- | src/lockdown.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index bc04fe9..8127456 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -1186,6 +1186,16 @@ lockdownd_error_t lockdownd_gen_pair_cert(gnutls_datum_t public_key, gnutls_datu break; } } + + if (essentially_null.data) + free(essentially_null.data); + gnutls_x509_crt_deinit(dev_cert); + gnutls_x509_crt_deinit(root_cert); + gnutls_x509_crt_deinit(host_cert); + gnutls_x509_privkey_deinit(fake_privkey); + gnutls_x509_privkey_deinit(root_privkey); + gnutls_x509_privkey_deinit(host_privkey); + } gnutls_free(modulus.data); |