[gtk/gtk-3-24: 1/13] gtkemojichooser: Do not leak the data loaded from resources
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24: 1/13] gtkemojichooser: Do not leak the data loaded from resources
- Date: Fri, 14 May 2021 00:42:05 +0000 (UTC)
commit 30835d7a8629c2fbfb894bfacaed8df4cf02e6a2
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed May 5 21:03:44 2021 +0200
gtkemojichooser: Do not leak the data loaded from resources
This was part of commit 67e6d1087 but not of gtk3 branch in commit
9cde2186.
gtk/gtkemojichooser.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkemojichooser.c b/gtk/gtkemojichooser.c
index c47ea08cb6..95b225cf0d 100644
--- a/gtk/gtkemojichooser.c
+++ b/gtk/gtkemojichooser.c
@@ -444,7 +444,6 @@ static gboolean
populate_emoji_chooser (gpointer data)
{
GtkEmojiChooser *chooser = data;
- GBytes *bytes = NULL;
GVariant *item;
guint64 start, now;
@@ -452,8 +451,9 @@ populate_emoji_chooser (gpointer data)
if (!chooser->data)
{
- bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL);
+ GBytes *bytes = g_resources_lookup_data ("/org/gtk/libgtk/emoji/emoji.data", 0, NULL);
chooser->data = g_variant_ref_sink (g_variant_new_from_bytes (G_VARIANT_TYPE ("a(auss)"), bytes,
TRUE));
+ g_bytes_unref (bytes);
}
if (!chooser->iter)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]