[gnome-keyring/trust-store] [gcr] Fix leak in gcr_pkcs11_certificate_lookup_issuer()
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring/trust-store] [gcr] Fix leak in gcr_pkcs11_certificate_lookup_issuer()
- Date: Fri, 10 Dec 2010 04:35:48 +0000 (UTC)
commit 53eb7be6c5177a988d25a2a39bba742353ff9a41
Author: Stef Walter <stefw collabora co uk>
Date: Fri Dec 10 04:31:55 2010 +0000
[gcr] Fix leak in gcr_pkcs11_certificate_lookup_issuer()
gcr/gcr-pkcs11-certificate.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/gcr/gcr-pkcs11-certificate.c b/gcr/gcr-pkcs11-certificate.c
index f889ad4..d7564b9 100644
--- a/gcr/gcr-pkcs11-certificate.c
+++ b/gcr/gcr-pkcs11-certificate.c
@@ -97,6 +97,8 @@ perform_lookup_certificate (GckEnumerator *en, GCancellable *cancel, GError **er
GcrCertificate *cert;
GckObject *object;
GckAttributes *attrs;
+ GckModule *module;
+ GckSession *session;
object = gck_enumerator_next (en, cancel, error);
@@ -120,14 +122,20 @@ perform_lookup_certificate (GckEnumerator *en, GCancellable *cancel, GError **er
return NULL;
}
+ module = gck_object_get_module (object);
+ session = gck_object_get_session (object);
+
cert = g_object_new (GCR_TYPE_PKCS11_CERTIFICATE,
- "module", gck_object_get_module (object),
+ "module", module,
"handle", gck_object_get_handle (object),
- "session", gck_object_get_session (object),
+ "session", session,
"attributes", attrs,
NULL);
+ g_object_unref (module);
+ g_object_unref (session);
g_object_unref (object);
+
gck_attributes_unref (attrs);
return cert;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]