[import-backend] plug memory leak with duplicate FITIDs

addendum to 579ba4431... if there are splits with duplicate FITID in
the hash, free the char*
This commit is contained in:
Christopher Lam 2022-07-19 00:02:41 +08:00
parent db9b4ab25d
commit 90804dcdc3

View File

@ -1215,8 +1215,8 @@ gboolean gnc_import_exists_online_id (Transaction *trans, GHashTable* acct_id_ha
if (gnc_import_split_has_online_id (n->data))
{
char *id = gnc_import_get_split_online_id (n->data);
g_hash_table_insert (new_hash, (void*) id, GINT_TO_POINTER (1));
/* note we don't want to free id yet */
if (!g_hash_table_insert (new_hash, (void*) id, GINT_TO_POINTER (1)))
g_free (id);
}
}
}