r21230 - gnucash/trunk/src/gnome-utils - (cppcheck) Fix mismatching allocation and deallocation: namespace

Christian Stimming cstim at code.gnucash.org
Thu Sep 1 02:50:45 EDT 2011


Author: cstim
Date: 2011-09-01 02:50:45 -0400 (Thu, 01 Sep 2011)
New Revision: 21230
Trac: http://svn.gnucash.org/trac/changeset/21230

Modified:
   gnucash/trunk/src/gnome-utils/dialog-commodity.c
Log:
(cppcheck) Fix mismatching allocation and deallocation: namespace

Modified: gnucash/trunk/src/gnome-utils/dialog-commodity.c
===================================================================
--- gnucash/trunk/src/gnome-utils/dialog-commodity.c	2011-09-01 06:50:32 UTC (rev 21229)
+++ gnucash/trunk/src/gnome-utils/dialog-commodity.c	2011-09-01 06:50:45 UTC (rev 21230)
@@ -730,7 +730,7 @@
 gchar *
 gnc_ui_namespace_picker_ns (GtkWidget *cbe)
 {
-    char *namespace;
+    gchar *namespace;
 
     g_return_val_if_fail(GTK_IS_COMBO_BOX_ENTRY (cbe), NULL);
 
@@ -740,7 +740,7 @@
     {
         /* In case the user types in ISO4217, map it to CURRENCY. */
         g_free(namespace);
-        return strdup(GNC_COMMODITY_NS_CURRENCY);
+        return g_strdup(GNC_COMMODITY_NS_CURRENCY);
     }
     else
         return namespace;



More information about the gnucash-changes mailing list