[empathy] libempathy: Fix reference counting of certs in verifier.
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] libempathy: Fix reference counting of certs in verifier.
- Date: Fri, 24 Dec 2010 14:05:48 +0000 (UTC)
commit d6cacab44d2c134688c79be7d62ab4307ce7f527
Author: Stef Walter <stefw collabora co uk>
Date: Thu Dec 9 22:14:19 2010 +0000
libempathy: Fix reference counting of certs in verifier.
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 a0feb77..386e3ce 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]