[evolution] Fix a crash where the list wasn't freed and crash on exit.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Fix a crash where the list wasn't freed and crash on exit.
- Date: Sat, 3 Mar 2012 15:52:06 +0000 (UTC)
commit f2ae5f830dc506e084731111008a8e90c093e97e
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Fri Mar 2 15:34:17 2012 +0530
Fix a crash where the list wasn't freed and crash on exit.
filter/e-rule-context.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c
index 175e885..0e2bbdc 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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]