diff options
author | Matthias Clasen <mclasen@redhat.com> | 2013-01-20 23:09:59 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2013-01-20 23:11:24 -0500 |
commit | b12d7dfcd61376ef110ca996b21ed2115ec635c4 (patch) | |
tree | ec7a859caca38e0127d9b7de56a396d07e272062 /demos | |
parent | a9ba4488bd78051b4eee62f754a9b9782a8678d9 (diff) | |
download | gtk+-b12d7dfcd61376ef110ca996b21ed2115ec635c4.tar.gz |
Plug two memory leak
g_resources_lookup_data returns a GBytes that must be unreffed.
Diffstat (limited to 'demos')
-rw-r--r-- | demos/gtk-demo/css_pixbufs.c | 1 | ||||
-rw-r--r-- | demos/gtk-demo/css_shadows.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/demos/gtk-demo/css_pixbufs.c b/demos/gtk-demo/css_pixbufs.c index c2b32b51cb..4f788a84e5 100644 --- a/demos/gtk-demo/css_pixbufs.c +++ b/demos/gtk-demo/css_pixbufs.c @@ -106,6 +106,7 @@ do_css_pixbufs (GtkWidget *do_widget) bytes = g_resources_lookup_data ("/css_pixbufs/gtk.css", 0, NULL); gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes)); + g_bytes_unref (bytes); g_signal_connect (provider, "parsing-error", diff --git a/demos/gtk-demo/css_shadows.c b/demos/gtk-demo/css_shadows.c index 382d5585a6..2ee2fec5cb 100644 --- a/demos/gtk-demo/css_shadows.c +++ b/demos/gtk-demo/css_shadows.c @@ -126,6 +126,7 @@ do_css_shadows (GtkWidget *do_widget) bytes = g_resources_lookup_data ("/css_shadows/gtk.css", 0, NULL); gtk_text_buffer_set_text (text, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes)); + g_bytes_unref (bytes); g_signal_connect (provider, "parsing-error", |