[Gnucash-changes] r11830 - gnucash/trunk/src/import-export/qif - Generate a new copy of the amount string when copying a QIF split.

David Hampton hampton at cvs.gnucash.org
Fri Nov 4 18:29:10 EST 2005


Author: hampton
Date: 2005-11-04 18:29:09 -0500 (Fri, 04 Nov 2005)
New Revision: 11830

Modified:
   gnucash/trunk/src/import-export/qif/qif-objects.c
Log:
Generate a new copy of the amount string when copying a QIF split.
Prevents a double free error when both the original and the copy split
are destroyed.


Modified: gnucash/trunk/src/import-export/qif/qif-objects.c
===================================================================
--- gnucash/trunk/src/import-export/qif/qif-objects.c	2005-11-04 23:26:21 UTC (rev 11829)
+++ gnucash/trunk/src/import-export/qif/qif-objects.c	2005-11-04 23:29:09 UTC (rev 11830)
@@ -489,6 +489,7 @@
 
   memcpy(s, split, sizeof(*s));
   if (s->memo) s->memo = g_strdup(s->memo);
+  if (s->amountstr) s->amountstr = g_strdup(s->amountstr);
   if (s->catstr) s->memo = g_strdup(s->catstr);
 
   return s;



More information about the gnucash-changes mailing list