diff options
author | Paolo Borelli <pborelli@katamail.com> | 2008-03-28 13:54:50 +0000 |
---|---|---|
committer | Paolo Borelli <pborelli@src.gnome.org> | 2008-03-28 13:54:50 +0000 |
commit | 9077e826f029feaac1ec8997a9b7961346031ce4 (patch) | |
tree | d18e8022b1732d33de24cda2eeebc93f05dfacf8 /daemon | |
parent | 5ea62d625d4684d8d707d66eadb2ad2f8f63465d (diff) | |
download | gvfs-9077e826f029feaac1ec8997a9b7961346031ce4.tar.gz |
Plug some more minor memory leaks.
2008-03-28 Paolo Borelli <pborelli@katamail.com>
* daemon/gvfsbackendsftp.c:
* daemon/gvfsjobclosewrite.c:
Plug some more minor memory leaks.
svn path=/trunk/; revision=1693
Diffstat (limited to 'daemon')
-rw-r--r-- | daemon/gvfsbackendsftp.c | 18 | ||||
-rw-r--r-- | daemon/gvfsjobclosewrite.c | 1 |
2 files changed, 12 insertions, 7 deletions
diff --git a/daemon/gvfsbackendsftp.c b/daemon/gvfsbackendsftp.c index 270e0803..f463f0ab 100644 --- a/daemon/gvfsbackendsftp.c +++ b/daemon/gvfsbackendsftp.c @@ -1311,13 +1311,11 @@ queue_command_streams_and_free (GVfsBackendSftp *backend, } } - 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 @@ get_uid_sync (GVfsBackendSftp *backend) 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 @@ get_uid_sync (GVfsBackendSftp *backend) 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 @@ delete_lstat_reply (GVfsBackendSftp *backend, 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 @@ delete_lstat_reply (GVfsBackendSftp *backend, _("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 @@ delete_lstat_reply (GVfsBackendSftp *backend, 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); } } diff --git a/daemon/gvfsjobclosewrite.c b/daemon/gvfsjobclosewrite.c index 5eea80b8..6bb15d96 100644 --- a/daemon/gvfsjobclosewrite.c +++ b/daemon/gvfsjobclosewrite.c @@ -46,6 +46,7 @@ g_vfs_job_close_write_finalize (GObject *object) 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); |