diff options
author | Dan Winship <danw@src.gnome.org> | 2001-04-19 02:04:13 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-04-19 02:04:13 +0800 |
commit | 0c90cd7ddae8e37d4c4ab85a2b2460b4d5dd0902 (patch) | |
tree | c4d01056c13f914755c7f6393d31ba841a0222ba /filter/rule-context.c | |
parent | 765e7194f1459f226b91ffc027024553e2d1a64b (diff) | |
download | gsoc2013-evolution-0c90cd7ddae8e37d4c4ab85a2b2460b4d5dd0902.tar.gz gsoc2013-evolution-0c90cd7ddae8e37d4c4ab85a2b2460b4d5dd0902.tar.zst gsoc2013-evolution-0c90cd7ddae8e37d4c4ab85a2b2460b4d5dd0902.zip |
Plug memory leaks.
* filter-colour.c, filter-datespec.c, filter-folder.c,
filter-input.c, filter-option.c, filter-rule.c, filter-score.c,
filter-source.c, score-rule.c (xml_decode): Plug memory leaks.
* rule-context.c (rule_context_finalise): Implement. Free stuff.
* filter-element.h: #include <gnome-xml/xmlmemory.h> here for xmlFree
* filter-filter.c, filter-part.c: Remove xmlmemory.h #include
svn path=/trunk/; revision=9451
Diffstat (limited to 'filter/rule-context.c')
-rw-r--r-- | filter/rule-context.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/filter/rule-context.c b/filter/rule-context.c index 5ab201c64a..3f121de572 100644 --- a/filter/rule-context.c +++ b/filter/rule-context.c @@ -106,8 +106,33 @@ static void rule_context_finalise(GtkObject * obj) { RuleContext *o = (RuleContext *) obj; + struct _part_set_map *psm; + struct _rule_set_map *rsm; + GList *next; + + g_free(o->priv); + g_hash_table_destroy(o->part_set_map); + g_hash_table_destroy(o->rule_set_map); + + for (; o->part_set_list; o->part_set_list = next) { + psm = o->part_set_list->data; + g_free (psm->name); + g_free (psm); + next = o->part_set_list->next; + g_list_free_1 (o->part_set_list); + } + for (; o->rule_set_list; o->rule_set_list = next) { + rsm = o->rule_set_list->data; + g_free (rsm->name); + g_free (rsm); + next = o->rule_set_list->next; + g_list_free_1 (o->rule_set_list); + } - o = o; + if (o->system) + xmlFreeDoc(o->system); + if (o->user) + xmlFreeDoc(o->user); ((GtkObjectClass *) (parent_class))->finalize(obj); } |