[grisbi-devel] [PATCH 05/15] Fix memory leak in gsb_data_category_get_name()
RĂ©mi Cardona
remi at gentoo.org
Sat Mar 9 16:53:57 CET 2013
---
src/gsb_data_category.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/gsb_data_category.c b/src/gsb_data_category.c
index bd49810..2736c59 100644
--- a/src/gsb_data_category.c
+++ b/src/gsb_data_category.c
@@ -863,10 +863,12 @@ gchar *gsb_data_category_get_name ( gint no_category,
if ( sub_category )
{
- return_value = g_strconcat ( return_value,
+ gchar *tmp = return_value;
+ return_value = g_strconcat ( tmp,
" : ",
sub_category -> sub_category_name,
NULL );
+ g_free ( tmp );
}
}
return return_value;
--
1.8.1.4
More information about the devel
mailing list