2007-09-18 [colin] 3.0.1cvs4
authorColin Leroy <colin@colino.net>
Tue, 18 Sep 2007 17:08:04 +0000 (17:08 +0000)
committerColin Leroy <colin@colino.net>
Tue, 18 Sep 2007 17:08:04 +0000 (17:08 +0000)
* src/toolbar.c
Fix bug 1320, 'Memory leak caused by
gtk_container_get_children'. Patch by
Guillaume Chazarain <guichaz@yahoo.fr>

ChangeLog
PATCHSETS
configure.ac
src/toolbar.c

index 2f5e131753de7133f98ce60139f0bb9a4b3d6ca0..534837aa502ae18813ed502302a3d4e282500684 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-09-18 [colin]     3.0.1cvs4
+
+       * src/toolbar.c
+               Fix bug 1320, 'Memory leak caused by 
+               gtk_container_get_children'. Patch by
+               Guillaume Chazarain <guichaz@yahoo.fr>
+
 2007-09-18 [colin]     3.0.1cvs3
 
        * src/printing.c
index b3eed20d224b13aed88c203324205dee290f8c53..2f3832edfd62982932aa78ed9109fe0ddbfd339e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.42.2.34 -r 1.42.2.35 NEWS;  cvs diff -u -r 1.8.2.41 -r 1.8.2.42 README;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 RELEASE_NOTES;  cvs diff -u -r 1.654.2.2920 -r 1.654.2.2921 configure.ac;  ) > 3.0.1cvs1.patchset
 ( cvs diff -u -r 1.155.2.74 -r 1.155.2.75 src/Makefile.am;  cvs diff -u -r 1.274.2.211 -r 1.274.2.212 src/mainwindow.c;  cvs diff -u -r 1.94.2.151 -r 1.94.2.152 src/messageview.c;  cvs diff -u -r 1.19.2.16 -r 1.19.2.17 src/messageview.h;  cvs diff -u -r 1.3.2.16 -r 1.3.2.17 src/prefs_ext_prog.c;  cvs diff -u -r 1.4.2.20 -r 1.4.2.21 src/prefs_fonts.c;  diff -u /dev/null src/printing.c;  diff -u /dev/null src/printing.h;  cvs diff -u -r 1.395.2.325 -r 1.395.2.326 src/summaryview.c;  ) > 3.0.1cvs2.patchset
 ( cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/printing.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/printing.h;  ) > 3.0.1cvs3.patchset
+( cvs diff -u -r 1.43.2.82 -r 1.43.2.83 src/toolbar.c;  ) > 3.0.1cvs4.patchset
index 19228d4fbd2af5185e7518a8997411b5ad04f001..d276c4d433a9f3de431dc51d9281e121872a0127 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=3
+EXTRA_VERSION=4
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a80c8945eedb2339127bf32dad678b4b65333f56..7e575c1ab1d565d5552a66141bede6a4e5a1bf51 100644 (file)
@@ -1643,8 +1643,10 @@ static void toolbar_buttons_cb(GtkWidget   *widget,
                        GTK_CONTAINER(child));                                                          \
        btn = (GtkWidget *)gchild->data;                                                                \
        arr = (GtkWidget *)(gchild->next?gchild->next->data:NULL);                                      \
+       g_list_free(gchild);                                                                            \
        gchild = gtk_container_get_children(GTK_CONTAINER(arr));                                        \
        gtk_widget_set_size_request(GTK_WIDGET(gchild->data), 9, -1);                                   \
+       g_list_free(gchild);                                                                            \
 }
 
 #define MAKE_MENU(entries,path,btn) {                                                                  \
@@ -2073,6 +2075,7 @@ void toolbar_update(ToolbarType type, gpointer data)
                GtkWidget *btn = (GtkWidget *)gchild->data;     \
                GtkWidget *arr = (GtkWidget *)                  \
                        (gchild->next?gchild->next->data:NULL); \
+               g_list_free(gchild);                            \
                if (GTK_IS_BUTTON(btn))                         \
                        in_btn1 = GTK_BUTTON(btn)->in_button;   \
                if (GTK_IS_BUTTON(arr))                         \
@@ -2095,6 +2098,7 @@ void toolbar_update(ToolbarType type, gpointer data)
                GtkWidget *btn = (GtkWidget *)gchild->data;     \
                GtkWidget *arr = (GtkWidget *)                  \
                        (gchild->next?gchild->next->data:NULL); \
+               g_list_free(gchild);                            \
                if (GTK_IS_BUTTON(btn))                         \
                        GTK_BUTTON(btn)->in_button = in_btn1;   \
                if (GTK_IS_BUTTON(arr))                         \