[seahorse/wip/nielsdg/fix-250] gpgpme: Photo: Don't use g_object_unref on gpgme_key_t
- From: Niels De Graef <nielsdg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [seahorse/wip/nielsdg/fix-250] gpgpme: Photo: Don't use g_object_unref on gpgme_key_t
- Date: Fri, 6 Dec 2019 07:54:08 +0000 (UTC)
commit 38ce469af1b381b1cfc7e54379e24a45a1127675
Author: Niels De Graef <nielsdegraef gmail com>
Date: Fri Dec 6 08:52:03 2019 +0100
gpgpme: Photo: Don't use g_object_unref on gpgme_key_t
`gpgme_key_t` is by no chance a GObject, so don't try to call
`g_clear_object` on it. This commit fixes a segfault.
Fixes https://gitlab.gnome.org/GNOME/seahorse/issues/250
pgp/seahorse-gpgme-photo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/pgp/seahorse-gpgme-photo.c b/pgp/seahorse-gpgme-photo.c
index 8942abdf..cc85ae07 100644
--- a/pgp/seahorse-gpgme-photo.c
+++ b/pgp/seahorse-gpgme-photo.c
@@ -104,7 +104,7 @@ seahorse_gpgme_photo_finalize (GObject *gobject)
{
SeahorseGpgmePhoto *self = SEAHORSE_GPGME_PHOTO (gobject);
- g_clear_object (&self->pubkey);
+ g_clear_pointer (&self->pubkey, gpgme_key_unref);
G_OBJECT_CLASS (seahorse_gpgme_photo_parent_class)->finalize (gobject);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]