aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@gnome.org>2012-03-02 18:04:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-03-03 22:02:34 +0800
commitf2ae5f830dc506e084731111008a8e90c093e97e (patch)
tree6164051a22f89a39b767eb81eb0dd72e02bac82a
parente758de5b1d7f0e257ff034caa9d73db64607a800 (diff)
downloadgsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.tar
gsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.tar.gz
gsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.tar.bz2
gsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.tar.lz
gsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.tar.xz
gsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.tar.zst
gsoc2013-evolution-f2ae5f830dc506e084731111008a8e90c093e97e.zip
Fix a crash where the list wasn't freed and crash on exit.
-rw-r--r--filter/e-rule-context.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c
index 175e885d8a..0e2bbdcd7e 100644
--- a/filter/e-rule-context.c
+++ b/filter/e-rule-context.c
@@ -582,8 +582,10 @@ e_rule_context_add_part_set (ERuleContext *context,
g_return_if_fail (append != NULL);
g_return_if_fail (next != NULL);
- if ((map = g_hash_table_lookup (context->part_set_map, setname)) != NULL) {
+ map = g_hash_table_lookup (context->part_set_map, setname);
+ if (map != NULL) {
g_hash_table_remove (context->part_set_map, setname);
+ context->part_set_list = g_list_remove (context->part_set_list, map);
free_part_set (map);
map = NULL;
}
@@ -611,8 +613,10 @@ e_rule_context_add_rule_set (ERuleContext *context,
g_return_if_fail (append != NULL);
g_return_if_fail (next != NULL);
- if ((map = g_hash_table_lookup (context->rule_set_map, setname)) != NULL) {
+ map = g_hash_table_lookup (context->rule_set_map, setname);
+ if (map != NULL) {
g_hash_table_remove (context->rule_set_map, setname);
+ context->rule_set_list = g_list_remove (context->rule_set_list, map);
free_rule_set (map);
map = NULL;
}