[gnome-keyring] Unref GkmXdgTrust::bytes in finalize()



commit a88f4fcf255495ee575b4b7b94574c3ca0b66ca1
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Sun Sep 21 22:10:23 2014 +0200

    Unref GkmXdgTrust::bytes in finalize()
    
    This will cause leaks otherwise, for example in test-xdg-module.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738508

 pkcs11/xdg-store/gkm-xdg-trust.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/pkcs11/xdg-store/gkm-xdg-trust.c b/pkcs11/xdg-store/gkm-xdg-trust.c
index c42682f..be0f4d4 100644
--- a/pkcs11/xdg-store/gkm-xdg-trust.c
+++ b/pkcs11/xdg-store/gkm-xdg-trust.c
@@ -706,6 +706,10 @@ gkm_xdg_trust_finalize (GObject *obj)
                g_hash_table_destroy (self->pv->assertions);
        self->pv->assertions = NULL;
 
+       if (self->pv->bytes)
+               g_bytes_unref (self->pv->bytes);
+       self->pv->bytes = NULL;
+
        G_OBJECT_CLASS (gkm_xdg_trust_parent_class)->finalize (obj);
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]