[gvfs] Fix memory leaks
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Fix memory leaks
- Date: Mon, 7 Sep 2009 14:18:10 +0000 (UTC)
commit c77e832a2b138de5507d7bd70f046457860d1e88
Author: Alexander Larsson <alexl redhat com>
Date: Mon Sep 7 16:17:45 2009 +0200
Fix memory leaks
Found these with valgrind
metadata/metatree.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/metadata/metatree.c b/metadata/metatree.c
index 38c7d45..d587b71 100644
--- a/metadata/metatree.c
+++ b/metadata/metatree.c
@@ -3220,6 +3220,7 @@ expand_parents (MetaLookupCache *cache,
strcmp (cache->last_parent, parent) != 0)
{
g_free (cache->last_parent);
+ g_free (cache->last_parent_expanded);
cache->last_parent = parent;
cache->last_parent_expanded = expand_all_symlinks (parent, &parent_dev);
cache->last_parent_dev = parent_dev;
@@ -3233,6 +3234,7 @@ expand_parents (MetaLookupCache *cache,
*parent_dev_out = cache->last_parent_dev;
basename = g_path_get_basename (path_copy);
+ g_free (path_copy);
res = g_build_filename (cache->last_parent_expanded, basename, NULL);
g_free (basename);
@@ -3313,6 +3315,7 @@ meta_lookup_cache_lookup_path (MetaLookupCache *cache,
}
found:
+ g_free (expanded);
tree = meta_tree_lookup_by_name (treename, for_write);
if (tree)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]