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 d174c06..2a232cc 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 77f5153..1e4fe43 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 30594e1..2a166fd 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 195de7b..9da14ea 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 38eb872..c0433f9 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 f9a51f6..90c1a16 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 65026e3..e4df8b7 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);