代码拉取完成,页面将自动刷新
From 87ef2d97a7124c012f9373eef3342db08e357fc1 Mon Sep 17 00:00:00 2001
From: Jan-Michael Brummer <jan-michael.brummer1@volkswagen.de>
Date: Thu, 13 Jun 2024 23:13:23 +0200
Subject: [PATCH] onedrive: Fix memory leaks
Relates: https://gitlab.gnome.org/GNOME/gvfs/-/issues/742
---
daemon/gvfsbackendonedrive.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/daemon/gvfsbackendonedrive.c b/daemon/gvfsbackendonedrive.c
index c09dcb6b..e1278431 100644
--- a/daemon/gvfsbackendonedrive.c
+++ b/daemon/gvfsbackendonedrive.c
@@ -630,7 +630,9 @@ resolve (GVfsBackendOnedrive *self,
if (out_path != NULL)
{
- *out_path = g_build_path ("/", *out_path, msg_drive_item_get_id (ret_val), NULL);
+ char *tmp = g_build_path ("/", *out_path, msg_drive_item_get_id (ret_val), NULL);
+ g_free (*out_path);
+ *out_path = tmp;
}
out:
@@ -1108,7 +1110,7 @@ g_vfs_backend_onedrive_mount (GVfsBackend *_self,
GMountSpec *real_mount_spec;
GError *error = NULL;
GList *accounts = NULL;
- GList *drives;
+ g_autolist (MsgDrive) drives = NULL;
GList *l = NULL;
const char *host = NULL;
@@ -1198,6 +1200,7 @@ g_vfs_backend_onedrive_mount (GVfsBackend *_self,
real_mount_spec = g_mount_spec_new ("onedrive");
g_mount_spec_set (real_mount_spec, "host", self->account_identity);
g_vfs_backend_set_mount_spec (_self, real_mount_spec);
+ g_mount_spec_unref (real_mount_spec);
g_vfs_backend_set_display_name (_self, self->account_identity);
g_vfs_job_succeeded (G_VFS_JOB (job));
@@ -1872,8 +1875,6 @@ g_vfs_backend_onedrive_dispose (GObject *_self)
{
GVfsBackendOnedrive *self = G_VFS_BACKEND_ONEDRIVE (_self);
- g_clear_object (&self->client);
-
g_clear_object (&self->service);
g_clear_object (&self->root);
g_clear_object (&self->home);
--
GitLab
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。