summaryrefslogtreecommitdiff
path: root/gvfs
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2012-03-28 17:26:53 +0200
committerTomas Bzatek <tbzatek@redhat.com>2012-03-28 17:26:53 +0200
commitbc2840a47145db5668045e281c2a2bbce14b68f4 (patch)
tree6af5e558ccae33bf4fd818c4b357fc649a7bbea7 /gvfs
parentf4d8292cf67ab481a27ea88f04e2edd6dc16119e (diff)
downloadtuxcmd-modules-bc2840a47145db5668045e281c2a2bbce14b68f4.tar.xz
GVFS: Don't leak enumerators
Diffstat (limited to 'gvfs')
-rw-r--r--gvfs/gvfs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gvfs/gvfs.c b/gvfs/gvfs.c
index a0de5cf..e50bdb0 100644
--- a/gvfs/gvfs.c
+++ b/gvfs/gvfs.c
@@ -573,6 +573,12 @@ VFSChangeDir (struct TVFSGlobs *globs, const char *NewPath, GError **error)
break;
}
+ if (globs->enumerator) {
+ g_file_enumerator_close (globs->enumerator, NULL, NULL);
+ g_object_unref (globs->enumerator);
+ }
+ if (globs->enumerated_file)
+ g_object_unref (globs->enumerated_file);
globs->enumerator = en;
globs->enumerated_file = g_file_dup (f);
g_object_unref (globs->file);