[gvfs] Fix leak
- From: Alexander Larsson <alexl src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Fix leak
- Date: Tue, 8 Sep 2009 07:33:12 +0000 (UTC)
commit 7d3f27bf9a94aef335a591bfdc927beacb0bd7a9
Author: Alexander Larsson <alexl redhat com>
Date: Tue Sep 8 09:32:18 2009 +0200
Fix leak
Need to free /proc/fd/mountinfo contents after reading it.
metadata/metatree.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/metadata/metatree.c b/metadata/metatree.c
index d587b71..21c6968 100644
--- a/metadata/metatree.c
+++ b/metadata/metatree.c
@@ -3002,7 +3002,10 @@ update_mountinfo (void)
contents = read_contents (mountinfo_fd);
lseek (mountinfo_fd, SEEK_SET, 0);
if (contents)
- mountinfo_roots = parse_mountinfo (contents);
+ {
+ mountinfo_roots = parse_mountinfo (contents);
+ g_free (contents);
+ }
}
static char *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]