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 2e53bb67b2f4bcf69508edaa89391fdd5f43f95a..8c03f15865fb3f7b48f96372b675db74e8e286da 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 ce63823c81523467975271e4b5878d3c69dabd6c..7e451686d801a560d5dfe1f4e3033c5a3ae0e6bb 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 18c5c667a92efb051d758a6669ead651ddddeb53..acf5261134d6139fb3e0a96fddcadb5b4f090de7 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 8a7930b06af929c99201dec04525677487bfa795..5626e3d9f296bdb9ec252f2b2bebb6a44a2e89f1 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 6c3cb3048c83fc51f7704748c2e6281442796938..6ab97459eb491acd39eaf2b49bb18ed7f5c9bfe7 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 b4e7ce5304c4c15942c2a001eecb8d2ab524f6bb..c873306cbcd1c3240dbd21d818358c0e9d4ca824 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;
        }