diff options
author | Alexander Larsson <alexl@redhat.com> | 2009-08-17 14:45:52 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2009-08-17 14:45:52 +0200 |
commit | 612452d52c1806696ef0c45f0b27ce6d07e315a3 (patch) | |
tree | 2f1484ee47f45998757df6642a887f5b1720cacc /metadata | |
parent | 6c4354f0230834465153263f1cbdba1e40e56fba (diff) | |
download | gvfs-612452d52c1806696ef0c45f0b27ce6d07e315a3.tar.gz |
Free MetaBuilder when rolling over log
Diffstat (limited to 'metadata')
-rw-r--r-- | metadata/metatree.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/metadata/metatree.c b/metadata/metatree.c index 3b043161..3a52317a 100644 --- a/metadata/metatree.c +++ b/metadata/metatree.c @@ -2336,6 +2336,7 @@ static gboolean meta_tree_flush_locked (MetaTree *tree) { MetaBuilder *builder; + gboolean res; builder = meta_builder_new (); @@ -2344,13 +2345,14 @@ meta_tree_flush_locked (MetaTree *tree) if (tree->journal) apply_journal_to_builder (tree, builder); - if (!meta_builder_write (builder, - meta_tree_get_filename (tree))) - return FALSE; + res = meta_builder_write (builder, + meta_tree_get_filename (tree)); + if (res) + meta_tree_refresh_locked (tree); - meta_tree_refresh_locked (tree); + meta_builder_free (builder); - return TRUE; + return res; } gboolean |