diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-03-06 23:52:53 -0500 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-03-06 23:52:53 -0500 |
commit | 28536bd9794ca1a383fa2abbb627ac858b87226e (patch) | |
tree | 6f796d314dd350a0e4656aff09db99ceb3613fe6 | |
parent | 65c8affb5ec813e96dccac8dd5d3443e70a36d3e (diff) | |
download | dconf-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.c | 8 |
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); } |