[gedit] Plug memory leaks with css loading



commit fa9263f9fb7a32c73f7635936fdf9ff589e1b43d
Author: Kalev Lember <kalevlember gmail com>
Date:   Tue Mar 18 13:49:03 2014 +0100

    Plug memory leaks with css loading
    
    https://bugzilla.gnome.org/show_bug.cgi?id=726627

 gedit/gedit-app.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index f4465b5..ce34e52 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -554,12 +554,14 @@ gedit_app_startup (GApplication *application)
                gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
                                                           GTK_STYLE_PROVIDER (provider),
                                                           GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
+               g_object_unref (provider);
        }
        else
        {
                g_warning ("Could not load css provider: %s", error->message);
                g_error_free (error);
        }
+       g_object_unref (css_file);
 
        /*
         * We use the default gtksourceview style scheme manager so that plugins


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