summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Petr Uzel2010-04-11 10:52:17 +0200
committerGravatar Martin Szulecki2010-04-11 15:54:50 +0200
commit15fc7e227d9698dcc8781560ff6f2bb35bb915ba (patch)
tree49ed2f6cd17f9b8fd3a408ab7ec1c14ea6c8b83e
parent1611acb9e716ceb5c644d72e0b1aad0cfe52fcbd (diff)
downloadlibimobiledevice-15fc7e227d9698dcc8781560ff6f2bb35bb915ba.tar.gz
libimobiledevice-15fc7e227d9698dcc8781560ff6f2bb35bb915ba.tar.bz2
plug memory leak in lockdownd_gen_pair_cert()
-rw-r--r--src/lockdown.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 8127456..41fe1a6 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -1169,6 +1169,9 @@ lockdownd_error_t lockdownd_gen_pair_cert(gnutls_datum_t public_key, gnutls_datu
g_free(pem_root_cert.data);
g_free(pem_host_cert.data);
+
+ if (dev_pem.data)
+ gnutls_free(dev_pem.data);
}
}
}