[grisbi-cvs] grisbi/src gsb_data_account.c,1.109,1.110

Pierre Biava pbiava at users.sourceforge.net
Wed May 26 23:05:30 CEST 2010


Update of /cvsroot/grisbi/grisbi/src
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv25770

Modified Files:
	gsb_data_account.c 
Log Message:
Fixes a crash when deleting an account

Index: gsb_data_account.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_data_account.c,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -d -r1.109 -r1.110
--- gsb_data_account.c	18 May 2010 20:12:54 -0000	1.109
+++ gsb_data_account.c	26 May 2010 21:05:28 -0000	1.110
@@ -287,32 +287,31 @@
     if ( ! account )
         return;
     if ( account -> account_id )
-	g_free ( account -> account_id );
+	    g_free ( account -> account_id );
     if ( account -> account_name )
-	g_free ( account -> account_name );
+	    g_free ( account -> account_name );
     if ( account -> name_icon )
-	g_free ( account -> name_icon );
+	    g_free ( account -> name_icon );
     if ( account -> comment )
-	g_free ( account -> comment );
+	    g_free ( account -> comment );
     if ( account -> holder_name )
-	g_free ( account -> holder_name );
+	    g_free ( account -> holder_name );
     if ( account -> holder_address )
-	g_free ( account -> holder_address );
+	    g_free ( account -> holder_address );
     if ( account -> bank_branch_code )
-	g_free ( account -> bank_branch_code );
+	    g_free ( account -> bank_branch_code );
     if ( account -> bank_account_number )
-	g_free ( account -> bank_account_number );
+	    g_free ( account -> bank_account_number );
     if ( account -> bank_account_key )
-	g_free ( account -> bank_account_key );
+	    g_free ( account -> bank_account_key );
     if ( account -> bank_account_iban )
-	g_free ( account -> bank_account_iban );
-    /* Should have already been freed */
+	    g_free ( account -> bank_account_iban );
     if ( account -> sort_list )
         g_slist_free( account -> sort_list ) ;
     if ( account -> form_organization )
         g_free ( account -> form_organization );
     if ( account -> bet_start_date )
-        g_date_free( account -> bet_start_date );
+        g_date_free ( account -> bet_start_date );
     g_free ( account );
     if ( account_buffer == account )
 	account_buffer = NULL;
@@ -335,11 +334,10 @@
     if (!account )
 	return FALSE;
 
-    g_slist_free ( account -> sort_list );
-    list_accounts = g_slist_remove ( list_accounts,
-				     account );
+    list_accounts = g_slist_remove ( list_accounts, account );
 
     _gsb_data_account_free ( account );
+
     return TRUE;
 }
 



More information about the cvs mailing list