gvfs r1693 - in trunk: . daemon



Author: pborelli
Date: Fri Mar 28 13:54:50 2008
New Revision: 1693
URL: http://svn.gnome.org/viewvc/gvfs?rev=1693&view=rev

Log:
2008-03-28  Paolo Borelli  <pborelli katamail com>

	* daemon/gvfsbackendsftp.c:
	* daemon/gvfsjobclosewrite.c:
	Plug some more minor memory leaks.


Modified:
   trunk/ChangeLog
   trunk/daemon/gvfsbackendsftp.c
   trunk/daemon/gvfsjobclosewrite.c

Modified: trunk/daemon/gvfsbackendsftp.c
==============================================================================
--- trunk/daemon/gvfsbackendsftp.c	(original)
+++ trunk/daemon/gvfsbackendsftp.c	Fri Mar 28 13:54:50 2008
@@ -1311,13 +1311,11 @@
     }
 }
 
-
 static gboolean
 get_uid_sync (GVfsBackendSftp *backend)
 {
   GDataOutputStream *command;
   GDataInputStream *reply;
-  GFileInfo *info;
   int type;
   
   command = new_command_stream (backend, SSH_FXP_STAT);
@@ -1336,6 +1334,8 @@
   backend->my_gid = (guint32)-1;
   if (type == SSH_FXP_ATTRS)
     {
+      GFileInfo *info;
+
       info = g_file_info_new ();
       parse_attributes (backend, info, NULL, reply, NULL);
       if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_UNIX_UID))
@@ -1346,9 +1346,12 @@
           backend->my_gid = g_file_info_get_attribute_uint32 (info,
                                                               G_FILE_ATTRIBUTE_UNIX_GID);
         }
+
       g_object_unref (info);
     }
 
+  g_object_unref (reply);
+
   return TRUE;
 }
 
@@ -3707,9 +3710,6 @@
                     GVfsJob *job,
                     gpointer user_data)
 {
-  GDataOutputStream *command;
-  GFileInfo *info;
-
   if (reply_type == SSH_FXP_STATUS)
     result_from_status (job, reply, -1, -1);
   else if (reply_type != SSH_FXP_ATTRS)
@@ -3717,9 +3717,11 @@
                       _("Invalid reply received"));
   else
     {
+      GFileInfo *info;
+      GDataOutputStream *command;
+
       info = g_file_info_new ();
-      parse_attributes (backend, info, NULL,
-                        reply, NULL);
+      parse_attributes (backend, info, NULL, reply, NULL);
 
       if (g_file_info_get_file_type (info) == G_FILE_TYPE_DIRECTORY)
         {
@@ -3735,6 +3737,8 @@
           put_string (command, G_VFS_JOB_DELETE (job)->filename);
           queue_command_stream_and_free (backend, command, delete_remove_reply, G_VFS_JOB (job), NULL);
         }
+
+      g_object_unref (info);
     }
 }
 

Modified: trunk/daemon/gvfsjobclosewrite.c
==============================================================================
--- trunk/daemon/gvfsjobclosewrite.c	(original)
+++ trunk/daemon/gvfsjobclosewrite.c	Fri Mar 28 13:54:50 2008
@@ -46,6 +46,7 @@
 
   job = G_VFS_JOB_CLOSE_WRITE (object);
   g_object_unref (job->channel);
+  g_free (job->etag);
 
   if (G_OBJECT_CLASS (g_vfs_job_close_write_parent_class)->finalize)
     (*G_OBJECT_CLASS (g_vfs_job_close_write_parent_class)->finalize) (object);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]