diff options
author | Not Zed <NotZed@Ximian.com> | 2001-08-08 17:39:56 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2001-08-08 17:39:56 +0800 |
commit | bbfda4227e6790fa945368cb5d4cb3d24e4da3d7 (patch) | |
tree | 6a451fa92a651f0750f0001e49d8b38a28c90e96 /filter/filter-option.c | |
parent | e835aa2faf3bf45c930924aaa60a134cdd269c35 (diff) | |
download | gsoc2013-evolution-bbfda4227e6790fa945368cb5d4cb3d24e4da3d7.tar.gz gsoc2013-evolution-bbfda4227e6790fa945368cb5d4cb3d24e4da3d7.tar.zst gsoc2013-evolution-bbfda4227e6790fa945368cb5d4cb3d24e4da3d7.zip |
Properly free the list of parts, and the private data.
2001-08-07 Not Zed <NotZed@Ximian.com>
* filter-rule.c (filter_rule_finalise): Properly free the list of
parts, and the private data.
(FilterRulePrivate): Remove unused 'parts' member.
* filter-option.c (free_option): For freeing options.
(filter_option_finalise): Free options list.
* filter-element.c (filter_element_finalise): free name.
* filter-input.c (filter_input_finalise): Free type and values
list.
* filter-context.c (filter_context_finalise): Free the actions.
* rule-context.c (rule_context_finalise): Remove the totally weird
arsed *_set_list free code.
(free_part_set):
(free_rule_set): Use this to free stuff using g_list_foreach.
(rule_context_finalise): Free the error string.
(rule_context_finalise): Free the rules and parts.
svn path=/trunk/; revision=11774
Diffstat (limited to 'filter/filter-option.c')
-rw-r--r-- | filter/filter-option.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/filter/filter-option.c b/filter/filter-option.c index 5167a3df9b..9648bc36a0 100644 --- a/filter/filter-option.c +++ b/filter/filter-option.c @@ -113,11 +113,21 @@ filter_option_init (FilterOption *o) } static void +free_option(struct _filter_option *o, void *data) +{ + g_free(o->title); + g_free(o->value); + g_free(o->code); + g_free(o); +} + +static void filter_option_finalise (GtkObject *obj) { FilterOption *o = (FilterOption *)obj; - - o = o; + + g_list_foreach(o->options, (GFunc)free_option, NULL); + g_list_free(o->options); ((GtkObjectClass *)(parent_class))->finalize(obj); } |