From 029b07fde38da3ce771fa0fabf8d76e452a0341f Mon Sep 17 00:00:00 2001 From: David Hampton Date: Fri, 4 Nov 2005 23:29:09 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@11830 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/import-export/qif/qif-objects.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/import-export/qif/qif-objects.c b/src/import-export/qif/qif-objects.c index 416af235a2..048e341911 100644 --- a/src/import-export/qif/qif-objects.c +++ b/src/import-export/qif/qif-objects.c @@ -489,6 +489,7 @@ qif_split_copy(QifSplit split) 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;