2005-10-25 [colin] 1.9.15cvs107
authorColin Leroy <colin@colino.net>
Tue, 25 Oct 2005 17:51:56 +0000 (17:51 +0000)
committerColin Leroy <colin@colino.net>
Tue, 25 Oct 2005 17:51:56 +0000 (17:51 +0000)
* src/addrbook.c
* src/addrindex.c
Fix leak (xml_get_element() allocates memory)
* src/compose.c
Fix leak + dead code (shame!)
* src/procmime.c
Fix leak

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/addrbook.c
src/addrindex.c
src/compose.c
src/procmime.c

index 4ca1d8e..9d7b029 100644 (file)
@@ -1,3 +1,13 @@
+2005-10-25 [colin]     1.9.15cvs107
+
+       * src/addrbook.c
+       * src/addrindex.c
+               Fix leak (xml_get_element() allocates memory)
+       * src/compose.c
+               Fix leak + dead code (shame!)
+       * src/procmime.c
+               Fix leak
+
 2005-10-25 [colin]     1.9.15cvs106
 
        * src/mimeview.c
index 78701c6..5da942a 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/wizard.c;  ) > 1.9.15cvs104.patchset
 ( cvs diff -u -r 1.13.2.16 -r 1.13.2.17 src/common/socket.c;  ) > 1.9.15cvs105.patchset
 ( cvs diff -u -r 1.83.2.49 -r 1.83.2.50 src/mimeview.c;  ) > 1.9.15cvs106.patchset
+( cvs diff -u -r 1.22.2.5 -r 1.22.2.6 src/addrbook.c;  cvs diff -u -r 1.28.2.11 -r 1.28.2.12 src/addrindex.c;  cvs diff -u -r 1.382.2.188 -r 1.382.2.189 src/compose.c;  cvs diff -u -r 1.49.2.64 -r 1.49.2.65 src/procmime.c;  ) > 1.9.15cvs107.patchset
index 972c49f..9054131 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=15
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=106
+EXTRA_VERSION=107
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 694808c..e0f8861 100644 (file)
@@ -508,6 +508,7 @@ static void addrbook_parse_attribute(XMLFile *file, ItemPerson *person)
 
        element = xml_get_element(file);
        addritem_attrib_set_value(uAttr, element);
+       g_free(element);
 
        if (uAttr) {
                if (person) {
index 5bdbabc..2a8f468 100644 (file)
@@ -1852,6 +1852,7 @@ static AddressCvtNode *addrindex_parse_item( XMLFile *file ) {
                if( xml_compare_tag( file, ELTAG_IF_OLD_REMARKS ) ) {
                        nn->remarks = g_strdup( element );
                }
+               g_free(element);
                xml_parse_next_tag(file);
        }
 }
index 877034d..98a0cad 100644 (file)
@@ -1437,15 +1437,18 @@ static gboolean compose_is_sig_separator(Compose *compose, GtkTextBuffer *textbu
        /* check sig separator */
        if (!strcmp(gtk_text_iter_get_text(&start, &end_iter),
                        compose->account->sig_sep)) {
+               gchar *tmp = NULL;
                /* check end of line (\n) */
                gtk_text_buffer_get_iter_at_offset(textbuf, &start,
                        start_pos+strlen(compose->account->sig_sep));
                gtk_text_buffer_get_iter_at_offset(textbuf, &end_iter,
                        start_pos+strlen(compose->account->sig_sep)+1);
-
-               if (!strcmp(gtk_text_iter_get_text(&start, &end_iter),"\n"));
+               tmp = gtk_text_iter_get_text(&start, &end_iter);
+               if (!strcmp(tmp,"\n")) {
+                       g_free(tmp);
                        return TRUE;
-               
+               }
+               g_free(tmp);    
 
        }
 
@@ -5991,6 +5994,9 @@ static void compose_destroy(Compose *compose)
        g_free(compose->exteditor_file);
 
        g_free(compose->orig_charset);
+
+       g_free(compose->privacy_system);
+
        if (addressbook_get_target_compose() == compose)
                addressbook_set_target_compose(NULL);
 
index 86fde56..f281ebf 100644 (file)
@@ -980,8 +980,10 @@ gchar *procmime_get_tmp_file_name(MimeInfo *mimeinfo)
                if (basetmp == NULL)
                        basetmp = "mimetmp";
                basetmp = g_path_get_basename(basetmp);
-               if (*basetmp == '\0') basetmp = g_strdup("mimetmp");
+               if (*basetmp == '\0') 
+                       basetmp = g_strdup("mimetmp");
                base = conv_filename_from_utf8(basetmp);
+               g_free(basetmp);
                subst_for_shellsafe_filename(base);
        }