[gedit] Fix memory leaks



commit 155ab8b57427c47e9ba6cfb293a6ac608a2c7245
Author: Pavel Vasin <rat4vier gmail com>
Date:   Wed Mar 6 18:53:07 2013 +0400

    Fix memory leaks
    
    https://bugzilla.gnome.org/show_bug.cgi?id=695301

 gedit/gedit-app.c            |    1 +
 gedit/gedit-multi-notebook.c |    2 ++
 gedit/gedit-window.c         |    2 ++
 3 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gedit/gedit-app.c b/gedit/gedit-app.c
index a6cfc0f..23b6ae0 100644
--- a/gedit/gedit-app.c
+++ b/gedit/gedit-app.c
@@ -884,6 +884,7 @@ gedit_app_command_line (GApplication            *application,
        }
 
        g_option_context_free (context);
+       g_strfreev (arguments);
        clear_options ();
 
        return 0;
diff --git a/gedit/gedit-multi-notebook.c b/gedit/gedit-multi-notebook.c
index 79d2f0b..31dd60d 100644
--- a/gedit/gedit-multi-notebook.c
+++ b/gedit/gedit-multi-notebook.c
@@ -742,6 +742,8 @@ gedit_multi_notebook_get_all_tabs (GeditMultiNotebook *mnb)
                {
                        ret = g_list_prepend (ret, l->data);
                }
+
+               g_list_free (children);
        }
 
        ret = g_list_reverse (ret);
diff --git a/gedit/gedit-window.c b/gedit/gedit-window.c
index 8a1a627..4abcc49 100644
--- a/gedit/gedit-window.c
+++ b/gedit/gedit-window.c
@@ -2851,6 +2851,8 @@ update_can_close (GeditWindow *window)
                                                                   GTK_APPLICATION_INHIBIT_LOGOUT,
                                                                   _("There are unsaved documents"));
        }
+
+       g_list_free (tabs);
 }
 
 static void


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