diff options
author | Milan Crha <mcrha@redhat.com> | 2009-12-15 18:12:41 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2009-12-15 18:12:41 +0800 |
commit | 859c8b5a8fae36bdb615f35f792c8256d4c8f97e (patch) | |
tree | 020d25459a72882a3406d3f4f28641e72e9ceda9 /smime/gui/certificate-manager.c | |
parent | c0c247128c71653e38c6a5de900a069e13a53d8e (diff) | |
download | gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.gz gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.tar.zst gsoc2013-evolution-859c8b5a8fae36bdb615f35f792c8256d4c8f97e.zip |
Bug #603342 - Memory leak fixes
Diffstat (limited to 'smime/gui/certificate-manager.c')
-rw-r--r-- | smime/gui/certificate-manager.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index f3a175c711..505ffaf30f 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -959,14 +959,18 @@ load_certs (CertificateManagerData *cfm, for (node = CERT_LIST_HEAD(certList); !CERT_LIST_END(node, certList); node = CERT_LIST_NEXT(node)) { - ECert *cert = e_cert_new ((CERTCertificate*)node->cert); + ECert *cert = e_cert_new (CERT_DupCertificate ((CERTCertificate*)node->cert)); ECertType ct = e_cert_get_cert_type (cert); /* show everything else in a contact tab */ if (ct == type || (type == E_CERT_CONTACT && ct != E_CERT_CA && ct != E_CERT_USER)) { add_cert (cfm, cert); + } else { + g_object_unref (cert); } } + + CERT_DestroyCertList (certList); } static void |