[gnome-keyring] Unref GkmCredential::secret in ::dispose
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-keyring] Unref GkmCredential::secret in ::dispose
- Date: Tue, 14 Oct 2014 16:18:34 +0000 (UTC)
commit 24ff22e04c86885aa4f7f877d612c94e2e2d8f6d
Author: Christophe Fergeau <cfergeau redhat com>
Date: Mon Sep 15 19:18:13 2014 +0200
Unref GkmCredential::secret in ::dispose
This fixes a memory leak.
https://bugzilla.gnome.org/show_bug.cgi?id=738508
pkcs11/gkm/gkm-credential.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pkcs11/gkm/gkm-credential.c b/pkcs11/gkm/gkm-credential.c
index c388544..16baa1a 100644
--- a/pkcs11/gkm/gkm-credential.c
+++ b/pkcs11/gkm/gkm-credential.c
@@ -209,6 +209,10 @@ gkm_credential_dispose (GObject *obj)
g_object_weak_unref (G_OBJECT (self->pv->object), object_went_away, self);
self->pv->object = NULL;
+ if (self->pv->secret)
+ g_object_unref (G_OBJECT (self->pv->secret));
+ self->pv->secret = NULL;
+
clear_data (self);
G_OBJECT_CLASS (gkm_credential_parent_class)->dispose (obj);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]