[gvfs] Free MetaBuilder when rolling over log
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Free MetaBuilder when rolling over log
- Date: Mon, 17 Aug 2009 13:17:46 +0000 (UTC)
commit 612452d52c1806696ef0c45f0b27ce6d07e315a3
Author: Alexander Larsson <alexl redhat com>
Date: Mon Aug 17 14:45:52 2009 +0200
Free MetaBuilder when rolling over log
metadata/metatree.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/metadata/metatree.c b/metadata/metatree.c
index 3b04316..3a52317 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]