Index: client/gvfsfusedaemon.c
===================================================================
--- client/gvfsfusedaemon.c	(revision 2355)
+++ client/gvfsfusedaemon.c	(working copy)
@@ -1406,8 +1406,18 @@ vfs_write (const gchar *path, const gcha
 static gint
 vfs_flush (const gchar *path, struct fuse_file_info *fi)
 {
+  FileHandle *fh = get_file_handle_from_info (fi);
+
   debug_print ("vfs_flush: %s\n", path);
 
+  if (fh)
+    {
+      file_handle_close_stream (fh);
+
+      /* get_file_handle_from_info () adds a "working ref", so release that. */
+      file_handle_unref (fh);
+    }
+
   return 0;
 }
 
