summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-03-06 23:52:53 -0500
committerRyan Lortie <desrt@desrt.ca>2012-03-06 23:52:53 -0500
commit28536bd9794ca1a383fa2abbb627ac858b87226e (patch)
tree6f796d314dd350a0e4656aff09db99ceb3613fe6
parent65c8affb5ec813e96dccac8dd5d3443e70a36d3e (diff)
downloaddconf-28536bd9794ca1a383fa2abbb627ac858b87226e.tar.gz
engine: free multiple 'shm' properly
In case of multiple user databases, we need to unref multiple 'shm' mappings.
-rw-r--r--engine/dconf-engine.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index 1c66992..6f5c2af 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -387,13 +387,12 @@ dconf_engine_free (DConfEngine *engine)
if (engine->lock_tables[i])
gvdb_table_unref (engine->lock_tables[i]);
- }
- if (engine->shm)
- {
- munmap (engine->shm, 1);
+ if (engine->shm[i])
+ munmap (engine->shm[i], 1);
}
+
g_mutex_clear (&engine->lock);
g_free (engine->object_paths);
@@ -401,6 +400,7 @@ dconf_engine_free (DConfEngine *engine)
g_free (engine->names);
g_free (engine->gvdbs);
g_free (engine->lock_tables);
+ g_free (engine->shm);
g_slice_free (DConfEngine, engine);
}