[dconf] dconf engine: don't leak lock table on reload
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] dconf engine: don't leak lock table on reload
- Date: Mon, 19 Mar 2012 15:35:05 +0000 (UTC)
commit 1ce11b2802c915b7e4c9c8d7f1d2862982335406
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Mar 19 11:24:26 2012 -0400
dconf engine: don't leak lock table on reload
If the system database changes while a program is running make sure we
unref the old copy of the lock table (if it exists) before trying to
load the new one.
engine/dconf-engine.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index 6f5c2af..aedabcf 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -169,6 +169,12 @@ dconf_engine_refresh_system (DConfEngine *engine,
{
if (engine->gvdbs[i] && !gvdb_table_is_valid (engine->gvdbs[i]))
{
+ if (engine->lock_tables[i])
+ {
+ gvdb_table_unref (engine->lock_tables[i]);
+ engine->lock_tables[i] = NULL;
+ }
+
gvdb_table_unref (engine->gvdbs[i]);
engine->gvdbs[i] = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]