[Commits] [SCM] claws branch, master, updated. 3.11.1-22-ga1d8f05

Colin colin at claws-mail.org
Sun Nov 16 14:25:21 CET 2014


The branch, master has been updated
       via  a1d8f05f4e1a40f16a6fa2ed23ab5a0e75987230 (commit)
      from  930395862ec422b5009ec9bcd1ea4ed768c17266 (commit)

Summary of changes:
 src/ldif.c |   16 +++-------------
 1 file changed, 3 insertions(+), 13 deletions(-)


- Log -----------------------------------------------------------------
commit a1d8f05f4e1a40f16a6fa2ed23ab5a0e75987230
Author: Colin Leroy <colin at colino.net>
Date:   Sun Nov 16 14:25:12 2014 +0100

    Fix double free

diff --git a/src/ldif.c b/src/ldif.c
index 5c57ad5..46b95be 100644
--- a/src/ldif.c
+++ b/src/ldif.c
@@ -642,20 +642,9 @@ static void ldif_read_file( LdifFile *ldifFile, AddressCache *cache ) {
 				/* Save record */
 				fullValue = mgu_list_coalesce( listValue );
 				if (fullValue && last64) {
-					out = g_base64_decode(fullValue, &len);
-					if (len >= 0) {
-						g_free(fullValue);
-						fullValue = out;
-						fullValue[len] = '\0';
-					}
-					g_free(out);
-				}
-				/* Base-64 encoded data */
-				/*
-				if( last64 ) {
-					ldif_dump_b64( fullValue );
+					g_free(fullValue);
+					fullValue = g_base64_decode(fullValue, &len);
 				}
-				*/
 
 				ldif_add_value( rec, lastTag, fullValue, hashField );
 				/* ldif_print_record( rec, stdout ); */
@@ -663,6 +652,7 @@ static void ldif_read_file( LdifFile *ldifFile, AddressCache *cache ) {
 				ldif_clear_rec( rec );
 				g_free( lastTag );
 				mgu_free_list( listValue );
+				g_free(fullValue);
 				lastTag = NULL;
 				listValue = NULL;
 				last64 = FALSE;

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list