diff options
author | Stef Walter <stefw@collabora.co.uk> | 2010-12-10 06:14:19 +0800 |
---|---|---|
committer | Stef Walter <stefw@collabora.co.uk> | 2010-12-24 21:40:02 +0800 |
commit | d6cacab44d2c134688c79be7d62ab4307ce7f527 (patch) | |
tree | 4cb2f88f37767c0caa196f9d017309ed77b15e81 /libempathy | |
parent | 34934197b7a1fb237c810c6de1aa498b4abbbc53 (diff) | |
download | gsoc2013-empathy-d6cacab44d2c134688c79be7d62ab4307ce7f527.tar.gz gsoc2013-empathy-d6cacab44d2c134688c79be7d62ab4307ce7f527.tar.zst gsoc2013-empathy-d6cacab44d2c134688c79be7d62ab4307ce7f527.zip |
libempathy: Fix reference counting of certs in verifier.
Diffstat (limited to 'libempathy')
-rw-r--r-- | libempathy/empathy-tls-verifier.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libempathy/empathy-tls-verifier.c b/libempathy/empathy-tls-verifier.c index a0feb77e8..386e3ce7a 100644 --- a/libempathy/empathy-tls-verifier.c +++ b/libempathy/empathy-tls-verifier.c @@ -138,7 +138,6 @@ check_is_certificate_anchor (EmpathyTLSVerifier *self, GcrCertificate *cert) ret = gcr_trust_is_certificate_anchor (cert, GCR_PURPOSE_CLIENT_AUTH, NULL, &error); - g_object_unref (cert); if (!ret && error) { DEBUG ("Can't lookup certificate anchor: %s", error->message); @@ -327,7 +326,10 @@ perform_verification (EmpathyTLSVerifier *self) */ cert_data = g_ptr_array_index (certs, 0); cert = gcr_simple_certificate_new_static (cert_data->data, cert_data->len); - if (check_is_certificate_exception (self, cert)) { + ret = check_is_certificate_exception (self, cert); + g_object_unref (cert); + + if (ret) { DEBUG ("Found certificate exception for %s", priv->hostname); complete_verification (self); goto out; |