[account.cpp] ~GncImapInfo = gnc_account_imap_info_destroy

pull/1771/head
Christopher Lam 3 years ago
parent db77fb81a5
commit 235e24a055

@ -647,17 +647,10 @@ get_imap_info (ImapDialog *imap_dialog, Account *acc, const gchar *category, con
// First add a child entry and pass iter to add_to_store
gtk_tree_store_append (GTK_TREE_STORE(imap_dialog->model), &child, &toplevel);
add_to_store (imap_dialog, &child, text, imapInfo);
// Free the members and structure
g_free (imapInfo->head);
g_free (imapInfo->category);
g_free (imapInfo->match_string);
g_free (imapInfo->count);
g_free (imapInfo);
}
}
g_free (acc_name);
g_list_free (imap_list); // Free the List
g_list_free_full (imap_list, (GDestroyNotify)gnc_account_imap_info_destroy); // Free the List
}
static void

@ -6232,6 +6232,15 @@ build_bayes (const char *suffix, KvpValue * value, GncImapInfo & imapInfo)
imapInfo.list = g_list_prepend (imapInfo.list, imap_node);
}
void gnc_account_imap_info_destroy (GncImapInfo* imapInfo)
{
g_free (imapInfo->head);
g_free (imapInfo->category);
g_free (imapInfo->match_string);
g_free (imapInfo->count);
g_free (imapInfo);
}
GList *
gnc_account_imap_get_info_bayes (Account *acc)
{

@ -1611,6 +1611,11 @@ typedef enum
char *count;
}GncImapInfo;
/** Clean destructor for the imap_info structure of Bayesian
* mappings
*/
void gnc_account_imap_info_destroy (GncImapInfo*);
/** Returns a GList of structure imap_info of all Bayesian mappings for
* required Account
*/

Loading…
Cancel
Save