r21232 - gnucash/trunk/src/gnome-utils - (cppcheck) Fix mismatching allocation and deallocation
Christian Stimming
cstim at code.gnucash.org
Thu Sep 1 02:51:06 EDT 2011
Author: cstim
Date: 2011-09-01 02:51:06 -0400 (Thu, 01 Sep 2011)
New Revision: 21232
Trac: http://svn.gnucash.org/trac/changeset/21232
Modified:
gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c
gnucash/trunk/src/gnome-utils/gnc-tree-view.c
Log:
(cppcheck) Fix mismatching allocation and deallocation
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c 2011-09-01 06:50:56 UTC (rev 21231)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-account.c 2011-09-01 06:51:06 UTC (rev 21232)
@@ -998,7 +998,7 @@
if (parent_iter)
{
gchar *parent_string;
- parent_string = strdup(iter_to_string(parent_iter));
+ parent_string = g_strdup(iter_to_string(parent_iter));
ENTER("model %p, iter %s, parent_iter %s, n %d",
tree_model, iter_to_string(iter),
parent_string, n);
@@ -1065,7 +1065,7 @@
{
gchar *child_string;
- child_string = strdup(iter_to_string(child));
+ child_string = g_strdup(iter_to_string(child));
ENTER("model %p, iter %s, child %s",
tree_model, iter_to_string(iter),
child_string);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c 2011-09-01 06:50:56 UTC (rev 21231)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-model-owner.c 2011-09-01 06:51:06 UTC (rev 21232)
@@ -799,7 +799,7 @@
if (parent_iter)
{
gchar *parent_string;
- parent_string = strdup(iter_to_string(parent_iter));
+ parent_string = g_strdup(iter_to_string(parent_iter));
ENTER("model %p, iter %s, parent_iter %s, n %d",
tree_model, iter_to_string(iter),
parent_string, n);
Modified: gnucash/trunk/src/gnome-utils/gnc-tree-view.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2011-09-01 06:50:56 UTC (rev 21231)
+++ gnucash/trunk/src/gnome-utils/gnc-tree-view.c 2011-09-01 06:51:06 UTC (rev 21232)
@@ -1102,7 +1102,7 @@
/* Make a copy of the local part of the key so it can be split
* into column name and key type */
known = FALSE;
- column_name = strdup(local);
+ column_name = g_strdup(local);
type_name = strrchr(column_name, '_');
*type_name++ = '\0';
More information about the gnucash-changes
mailing list