2009-09-28 [colin] 3.7.2cvs41
authorColin Leroy <colin@colino.net>
Mon, 28 Sep 2009 07:06:42 +0000 (07:06 +0000)
committerColin Leroy <colin@colino.net>
Mon, 28 Sep 2009 07:06:42 +0000 (07:06 +0000)
* src/matcher.c
* src/mimeview.c
* src/prefs_folder_item.c
Fix bug 2007, 'Small memory leaks'. Patch by Pawel

ChangeLog
PATCHSETS
configure.ac
src/matcher.c
src/mimeview.c
src/prefs_folder_item.c

index 2e53bb6..8c03f15 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-09-28 [colin]     3.7.2cvs41
+
+       * src/matcher.c
+       * src/mimeview.c
+       * src/prefs_folder_item.c
+               Fix bug 2007, 'Small memory leaks'. Patch by Pawel
+
 2009-09-28 [colin]     3.7.2cvs40
 
        * src/prefs_summaries.c
index ce63823..7e45168 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.654.2.3931 -r 1.654.2.3932 configure.ac;  ) > 3.7.2cvs38.patchset
 ( cvs diff -u -r 1.654.2.3932 -r 1.654.2.3933 configure.ac;  ) > 3.7.2cvs39.patchset
 ( cvs diff -u -r 1.1.2.60 -r 1.1.2.61 src/prefs_summaries.c;  cvs diff -u -r 1.9.2.28 -r 1.9.2.29 src/gtk/sslcertwindow.c;  ) > 3.7.2cvs40.patchset
+( cvs diff -u -r 1.75.2.66 -r 1.75.2.67 src/matcher.c;  cvs diff -u -r 1.83.2.155 -r 1.83.2.156 src/mimeview.c;  cvs diff -u -r 1.52.2.77 -r 1.52.2.78 src/prefs_folder_item.c;  ) > 3.7.2cvs41.patchset
index 18c5c66..acf5261 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=40
+EXTRA_VERSION=41
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 8a7930b..5626e3d 100644 (file)
@@ -689,13 +689,21 @@ static gboolean matcherprop_match_test(const MatcherProp *prop,
 #endif
 
        file = procmsg_get_message_file(info);
-       if (file == NULL)
+       if (file == NULL) {
+#ifdef USE_PTHREAD
+               g_free(td);
+#endif
                return FALSE;
+       }
        g_free(file);           
 
        cmd = matching_build_command(prop->expr, info);
-       if (cmd == NULL)
+       if (cmd == NULL) {
+#ifdef USE_PTHREAD
+               g_free(td);
+#endif 
                return FALSE;
+}
 
 #ifdef USE_PTHREAD
        /* debug output */
index 6c3cb30..6ab9745 100644 (file)
@@ -1598,8 +1598,10 @@ static gchar *mimeview_get_filename_for_part(MimeInfo *partinfo,
        gchar *filename;
 
        filename = g_strdup(get_part_name(partinfo));
-       if (!filename || !*filename)
+       if (!filename || !*filename) {
+               g_free(filename);
                filename = g_strdup_printf("noname.%d", number);
+       }
 
        if (!g_utf8_validate(filename, -1, NULL)) {
                gchar *tmp = conv_filename_to_utf8(filename);
index b4e7ce5..c873306 100644 (file)
@@ -1647,14 +1647,16 @@ static void folder_regexp_test_cb(GtkWidget *widget, gpointer data)
        if (!regexp || !regexp[0]) {
                gtk_widget_modify_base(page->entry_simplify_subject,
                                GTK_STATE_NORMAL, NULL);
-               if (test_string) {
+               if (test_string)
                        gtk_entry_set_text(GTK_ENTRY(page->entry_regexp_test_result), test_string);
-                       g_free(test_string);
-               }
+                       
+               g_free(test_string);
+               g_free(regexp);
                return;
        }
 
        if (!test_string || !test_string[0]) {
+               g_free(test_string);
                g_free(regexp);
                return;
        }