2011-01-25 [colin] 3.7.8cvs46
authorColin Leroy <colin@colino.net>
Tue, 25 Jan 2011 17:01:01 +0000 (17:01 +0000)
committerColin Leroy <colin@colino.net>
Tue, 25 Jan 2011 17:01:01 +0000 (17:01 +0000)
* src/compose.c
* src/prefs_common.c
* src/common/md5.c
* src/common/ssl_certificate.c
Fix mismatched alloc/free (thanks to cppcheck)

ChangeLog
PATCHSETS
configure.ac
src/common/md5.c
src/common/ssl_certificate.c
src/compose.c
src/prefs_common.c

index d174c0607af03e51a04e57bf87fb6d1b11c0019b..2a232cca455fd5d8db81f2d4840d4e068299dbc5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-01-25 [colin]     3.7.8cvs46
+
+       * src/compose.c
+       * src/prefs_common.c
+       * src/common/md5.c
+       * src/common/ssl_certificate.c
+               Fix mismatched alloc/free (thanks to cppcheck)
+
 2011-01-25 [colin]     3.7.8cvs45
 
        * src/pop.c
index 77f5153719a650f7665d166b229c35058fc92794..1e4fe438509d94ab2136b044d3a48619eb779215 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.4.2.77 -r 1.4.2.78 src/gtk/about.c;  ) > 3.7.8cvs43.patchset
 ( cvs diff -u -r 1.1.2.16 -r 1.1.2.17 manual/es/advanced.xml;  ) > 3.7.8cvs44.patchset
 ( cvs diff -u -r 1.56.2.66 -r 1.56.2.67 src/pop.c;  ) > 3.7.8cvs45.patchset
+( cvs diff -u -r 1.382.2.566 -r 1.382.2.567 src/compose.c;  cvs diff -u -r 1.204.2.199 -r 1.204.2.200 src/prefs_common.c;  cvs diff -u -r 1.2.2.9 -r 1.2.2.10 src/common/md5.c;  cvs diff -u -r 1.4.2.36 -r 1.4.2.37 src/common/ssl_certificate.c;  ) > 3.7.8cvs46.patchset
index 30594e1df5e5c7b451b3baa9b16f392d29e83810..2a166fded05d2e274d963ee3c00aa61a16cde747 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=8
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=45
+EXTRA_VERSION=46
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 195de7b99cb181c9d101ee82417ca4a699d6efd2..9da14ea32f23b0980db72a3807f72d17d611be38 100644 (file)
@@ -359,7 +359,7 @@ md5_hex_digest_file(char *hexdigest, const unsigned char *file)
 
        if (fd == -1) {
                FILE_OP_ERROR(file, "open");
-               g_free(buf);
+               free(buf);
                return -1;
        }
        
index 38eb8726ec85174be4fd09a7eb89a559cf91a3fa..c0433f99e284da4630ca89a625b0d2d8bb7e4a2b 100644 (file)
@@ -493,8 +493,8 @@ static gboolean ssl_certificate_compare (SSLCertificate *cert_a, SSLCertificate
                return FALSE;
        }
 
-       output_a = malloc(cert_size_a);
-       output_b = malloc(cert_size_b);
+       output_a = g_malloc(cert_size_a);
+       output_b = g_malloc(cert_size_b);
        if ((r = gnutls_x509_crt_export(cert_a->x509_cert, GNUTLS_X509_FMT_DER, output_a, &cert_size_a)) < 0) {
                g_warning("couldn't gnutls_x509_crt_export a %s\n", gnutls_strerror(r));
                g_free(output_a);
index f9a51f6520a7af720c3e576522be6bf52a2f0d19..90c1a168f25366d42fe249c21d66353c4cd5fba4 100644 (file)
@@ -991,7 +991,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
                        dummyinfo = compose_msginfo_new_from_compose(compose);
 
                        /* decode \-escape sequences in the internal representation of the quote format */
-                       tmp = malloc(strlen(item->prefs->compose_override_from_format)+1);
+                       tmp = g_malloc(strlen(item->prefs->compose_override_from_format)+1);
                        pref_get_unescaped_pref(tmp, item->prefs->compose_override_from_format);
 
 #ifdef USE_ENCHANT
@@ -1082,7 +1082,7 @@ Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderI
                                dummyinfo = compose_msginfo_new_from_compose(compose);
 
                        /* decode \-escape sequences in the internal representation of the quote format */
-                       tmp = malloc(strlen(subject_format)+1);
+                       tmp = g_malloc(strlen(subject_format)+1);
                        pref_get_unescaped_pref(tmp, subject_format);
 
                        subject = gtk_editable_get_chars(GTK_EDITABLE(compose->subject_entry), 0, -1);
@@ -1548,7 +1548,7 @@ static Compose *compose_generic_reply(MsgInfo *msginfo,
                gchar *buf = NULL;
 
                /* decode \-escape sequences in the internal representation of the quote format */
-               tmp = malloc(strlen(msginfo->folder->prefs->reply_override_from_format)+1);
+               tmp = g_malloc(strlen(msginfo->folder->prefs->reply_override_from_format)+1);
                pref_get_unescaped_pref(tmp, msginfo->folder->prefs->reply_override_from_format);
 
 #ifdef USE_ENCHANT
@@ -1729,7 +1729,7 @@ Compose *compose_forward(PrefsAccount *account, MsgInfo *msginfo,
                        full_msginfo = procmsg_msginfo_copy(msginfo);
 
                /* decode \-escape sequences in the internal representation of the quote format */
-               tmp = malloc(strlen(msginfo->folder->prefs->forward_override_from_format)+1);
+               tmp = g_malloc(strlen(msginfo->folder->prefs->forward_override_from_format)+1);
                pref_get_unescaped_pref(tmp, msginfo->folder->prefs->forward_override_from_format);
 
 #ifdef USE_ENCHANT
@@ -1924,7 +1924,7 @@ static Compose *compose_forward_multiple(PrefsAccount *account, GSList *msginfo_
                        gchar *buf = NULL;
 
                        /* decode \-escape sequences in the internal representation of the quote format */
-                       tmp = malloc(strlen(msginfo->folder->prefs->forward_override_from_format)+1);
+                       tmp = g_malloc(strlen(msginfo->folder->prefs->forward_override_from_format)+1);
                        pref_get_unescaped_pref(tmp, msginfo->folder->prefs->forward_override_from_format);
 
 #ifdef USE_ENCHANT
@@ -2959,7 +2959,7 @@ static gchar *compose_quote_fmt(Compose *compose, MsgInfo *msginfo,
                        gchar *tmp = NULL;
 
                        /* decode \-escape sequences in the internal representation of the quote format */
-                       tmp = malloc(strlen(fmt)+1);
+                       tmp = g_malloc(strlen(fmt)+1);
                        pref_get_unescaped_pref(tmp, fmt);
                        quote_fmt_scan_string(tmp);
                        quote_fmt_parse();
index 65026e31fd296540d536f45b08e13caa28edbb3e..e4df8b77882eab32c4d9eb09d1f003389f55b5ac 100644 (file)
@@ -1439,7 +1439,7 @@ void pref_set_textview_from_pref(GtkTextView *textview, const gchar *txt)
        if (!txt) {
                gtk_text_buffer_set_text(buffer, "", -1);
        } else {
-               out = malloc(strlen(txt)+1);
+               out = g_malloc(strlen(txt)+1);
 
                pref_get_unescaped_pref(out, txt);
 
@@ -1458,7 +1458,7 @@ void pref_set_entry_from_pref(GtkEntry *entry, const gchar *txt)
        if (!txt) {
                gtk_entry_set_text(entry, "");
        } else {
-               out = malloc(strlen(txt)+1);
+               out = g_malloc(strlen(txt)+1);
 
                pref_get_unescaped_pref(out, txt);