forked from AuroraMiddleware/gtk
Plug two memory leak
g_resources_lookup_data returns a GBytes that must be unreffed.
This commit is contained in:
parent
a9ba4488bd
commit
b12d7dfcd6
@ -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",
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user