o fix another memory leak reported by Martin Kluge (see "[ 599568 ] Small Memory...
authorAlfons Hoogervorst <alfons@proteus.demon.nl>
Sat, 24 Aug 2002 09:21:39 +0000 (09:21 +0000)
committerAlfons Hoogervorst <alfons@proteus.demon.nl>
Sat, 24 Aug 2002 09:21:39 +0000 (09:21 +0000)
o remove 'from' variable from 'summary_set_header()'; we can do with just 'to'

ChangeLog.claws
configure.in
src/summaryview.c

index 0a4f548cd19a0cb3cae9bec0fb1ebb9bd6e56bd9..cd4cc0b3aeb64ae4cf4c2c3ac78c5e74916f0790 100644 (file)
@@ -1,3 +1,11 @@
+2002-08-24 [alfons]    0.8.2claws114
+
+       * src/summaryview.c
+               o fix another memory leak reported by Martin Kluge
+                 (see "[ 599568 ] Small Memory Leak")
+               o remove 'from' variable from 'summary_set_header()'; we can
+                 do with just 'to' 
+
 2002-08-24 [paul]      0.8.2claws113
 
        * sync with 0.8.1cvs30
 2002-08-24 [paul]      0.8.2claws113
 
        * sync with 0.8.1cvs30
index 470dd70bba3957685816e51d87e970a06383cccc..201a0fda1e2d3edf80e0a19ec2297f4875709e5e 100644 (file)
@@ -8,7 +8,7 @@ MINOR_VERSION=8
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws113
+EXTRA_VERSION=claws114
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 9048d28be3d15301ad4c2ea21a28a9429725f671..51e8c265dab8b724dd54b3ce8894abab43f23f31 100644 (file)
@@ -2187,7 +2187,6 @@ static void summary_set_header(SummaryView *summaryview, gchar *text[],
 {
        static gchar date_modified[80];
        static gchar *to = NULL;
 {
        static gchar date_modified[80];
        static gchar *to = NULL;
-       static gchar *from = NULL;
        static gchar col_score[11];
        static gchar buf[BUFFSIZE];
        gint *col_pos = summaryview->col_pos;
        static gchar col_score[11];
        static gchar buf[BUFFSIZE];
        gint *col_pos = summaryview->col_pos;
@@ -2225,6 +2224,7 @@ static void summary_set_header(SummaryView *summaryview, gchar *text[],
                                g_free(to);
                                to   = g_strconcat("-->", addr == NULL ? msginfo->to : addr, NULL);
                                text[col_pos[S_COL_FROM]] = to;
                                g_free(to);
                                to   = g_strconcat("-->", addr == NULL ? msginfo->to : addr, NULL);
                                text[col_pos[S_COL_FROM]] = to;
+                               g_free(addr);
                        }
                } else {
                        if (cur_account && cur_account->address && !strcmp( addr, cur_account->address)) {
                        }
                } else {
                        if (cur_account && cur_account->address && !strcmp( addr, cur_account->address)) {
@@ -2241,10 +2241,12 @@ static void summary_set_header(SummaryView *summaryview, gchar *text[],
         * the --> in sent boxes) was executed.
         */
        if (text[col_pos[S_COL_FROM]] != to && prefs_common.use_addr_book && msginfo->from) {
         * the --> in sent boxes) was executed.
         */
        if (text[col_pos[S_COL_FROM]] != to && prefs_common.use_addr_book && msginfo->from) {
-               g_free(from);
-               from = summary_complete_address(msginfo->from);
-               if (from)
-                       text[col_pos[S_COL_FROM]] = from;
+               gchar *from = summary_complete_address(msginfo->from);
+               if (from) {
+                       g_free(to);
+                       to = from;
+                       text[col_pos[S_COL_FROM]] = to;
+               }                       
        }
 
        if (summaryview->simplify_subject_preg != NULL)
        }
 
        if (summaryview->simplify_subject_preg != NULL)