[gnc-sx-instance-model.c] leak: don't strdup char* for xaccTransSetNotes

For a while now, xaccTransSetNotes would strdup the notes. Don't need
to strdup it beforehand.
This commit is contained in:
Christopher Lam 2022-04-19 22:15:18 +08:00
parent 27e5515c43
commit 394e0a4b71

View File

@ -1267,9 +1267,7 @@ create_each_transaction_helper(Transaction *template_txn, void *user_data)
/* Bug#500427: copy the notes, if any */
if (xaccTransGetNotes(template_txn) != NULL)
{
xaccTransSetNotes(new_txn, g_strdup(xaccTransGetNotes(template_txn)));
}
xaccTransSetNotes (new_txn, xaccTransGetNotes (template_txn));
xaccTransSetDate(new_txn,
g_date_get_day(&creation_data->instance->date),