[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_4-100-g3d552d7

Philippe Delorme nobody at users.sourceforge.net
Mon Nov 7 22:29:38 CET 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  3d552d745ef67b6446242cd1f1b72bb63ec87d22 (commit)
      from  f61b7b6f8859a22ef23b048658630544ab95425a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3d552d745ef67b6446242cd1f1b72bb63ec87d22
Author: Philippe Delorme <philippedelorme at users.sourceforge.net>
Date:   Mon Nov 7 22:27:28 2011 +0100

    Fixed memory leak

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

Changes:
diff --git a/src/gsb_data_account.c b/src/gsb_data_account.c
index 9613789..7376f3f 100644
--- a/src/gsb_data_account.c
+++ b/src/gsb_data_account.c
@@ -2795,21 +2795,26 @@ gboolean gsb_data_account_set_bank_account_iban ( gint account_number, const gch
 void gsb_data_account_colorize_current_balance ( gint account_number )
 {
     gchar *string;
+    gchar *tmpstr;
+
+    tmpstr = utils_real_get_string_with_currency (
+            gsb_data_account_get_current_balance (account_number),
+            gsb_data_account_get_currency (account_number),
+            TRUE
+            );
+    string = tmpstr;
+
+    if ( gsb_data_account_get_current_balance (account_number).mantissa < 0 )
+    {
+        string = g_strdup_printf ( "<span color=\"red\">%s</span>", tmpstr );
+        g_free ( tmpstr );
+    }
 
-	if (gsb_data_account_get_current_balance (account_number).mantissa < 0)
-	    string = g_strdup_printf ( "<span color=\"red\">%s</span>",
-                        utils_real_get_string_with_currency (
-                        gsb_data_account_get_current_balance (account_number),
-                        gsb_data_account_get_currency (account_number), TRUE ));
-	else
-	    string = utils_real_get_string_with_currency (
-                        gsb_data_account_get_current_balance (account_number),
-                        gsb_data_account_get_currency (account_number), TRUE );
     if ( !string )
-    	string = g_strdup ( "" );
+        string = g_strdup ( "" );
 
-	gsb_gui_headings_update_suffix ( string );
-	g_free ( string );
+    gsb_gui_headings_update_suffix ( string );
+    g_free ( string );
 }
 
 


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list