Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
fd5f756581
!51 Fix Error: File listed twice
From: @streamlet_hy 
Reviewed-by: @open-bot 
Signed-off-by: @open-bot
2024-04-17 08:26:05 +00:00
Huang Yang
567166fd03 Fix error File listed twice 2024-04-17 07:57:22 +00:00
openeuler-ci-bot
07d67f2a8b
!46 Modify memory-leaks patch errors
From: @tjwangxm 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2024-03-05 03:18:58 +00:00
wangxiaomeng
cb70987407 Modify memory-leaks patch errors 2024-01-12 15:10:26 +08:00
openeuler-ci-bot
61e6b65afd
!35 Fix memory leaks detected by valgrind
From: @houlifei_uniontech 
Reviewed-by: @leeffo 
Signed-off-by: @leeffo
2023-07-28 02:08:55 +00:00
houlifei
3853aefaae Fix memory leaks detected by valgrind 2023-07-20 18:57:04 +08:00
openeuler-ci-bot
9f40098734
!34 add library path file to /etc/ld.so.conf.d
From: @zhang__3125 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
2023-03-22 22:37:55 +00:00
丈青山
fe22a3b665
add library path file to /etc/ld.so.conf.d
Signed-off-by: 丈青山 <lin.zhang@turbolinux.com.cn>
2023-03-22 15:52:41 +00:00
openeuler-ci-bot
7528483b45
!29 delete invalid line
From: @zhang__3125 
Reviewed-by: @dwl301 
Signed-off-by: @dwl301
2023-03-15 06:41:19 +00:00
丈青山
a7772ea297
update gvfs.spec.
Signed-off-by: 丈青山 <lin.zhang@turbolinux.com.cn>
2023-03-15 06:28:14 +00:00
2 changed files with 105 additions and 3 deletions

View File

@ -0,0 +1,77 @@
From 64581a94ceeb3f3d3121823fbd309a8c81c8b4fb Mon Sep 17 00:00:00 2001
From: wang xiaomeng <wxiaomeng2016@gmail.com>
Date: Tue, 18 Jul 2023 09:04:19 +0000
Subject: [PATCH] Fix various memory leaks
Valgrind detects various memory leaks in gvfs daemons. Let's fix some of them.
Fixes: https://gitlab.gnome.org/GNOME/gvfs/-/issues/682
---
common/gvfsmountinfo.c | 2 +-
daemon/gvfsbackendnetwork.c | 9 +--------
daemon/gvfsdaemon.c | 3 +++
monitor/gphoto2/ggphoto2volumemonitor.c | 1 +
4 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/common/gvfsmountinfo.c b/common/gvfsmountinfo.c
index c3f31af..287b9db 100644
--- a/common/gvfsmountinfo.c
+++ b/common/gvfsmountinfo.c
@@ -640,7 +640,7 @@ _g_find_file_insensitive_async (GFile *parent,
G_FILE_QUERY_INFO_NONE, G_PRIORITY_DEFAULT,
cancellable,
find_file_insensitive_exists_callback, task);
-
+ g_object_unref (direct_file);
}
diff --git a/daemon/gvfsbackendnetwork.c b/daemon/gvfsbackendnetwork.c
index 87cfec7..50cdc27 100644
--- a/daemon/gvfsbackendnetwork.c
+++ b/daemon/gvfsbackendnetwork.c
@@ -902,14 +902,7 @@ g_vfs_backend_network_init (GVfsBackendNetwork *network_backend)
network_backend->smb_settings = g_settings_new ("org.gnome.system.smb");
current_workgroup = g_settings_get_string (network_backend->smb_settings, "workgroup");
-
- if (current_workgroup == NULL ||
- current_workgroup[0] == 0)
- /* it's okay if current_workgroup is null here,
- * it's checked before the NetworkFile is added anyway. */
- network_backend->current_workgroup = NULL;
- else
- network_backend->current_workgroup = current_workgroup;
+ network_backend->current_workgroup = current_workgroup;
g_signal_connect (network_backend->smb_settings,
"change-event",
diff --git a/daemon/gvfsdaemon.c b/daemon/gvfsdaemon.c
index a6d6236..f659041 100644
--- a/daemon/gvfsdaemon.c
+++ b/daemon/gvfsdaemon.c
@@ -145,6 +145,9 @@ g_vfs_daemon_finalize (GObject *object)
daemon = G_VFS_DAEMON (object);
+ if (daemon->thread_pool != NULL)
+ g_thread_pool_free (daemon->thread_pool, TRUE, FALSE);
+
/* There may be some jobs outstanding if we've been force unmounted. */
if (daemon->jobs)
g_warning ("daemon->jobs != NULL when finalizing daemon!");
diff --git a/monitor/gphoto2/ggphoto2volumemonitor.c b/monitor/gphoto2/ggphoto2volumemonitor.c
index 54dec6e..77d458a 100644
--- a/monitor/gphoto2/ggphoto2volumemonitor.c
+++ b/monitor/gphoto2/ggphoto2volumemonitor.c
@@ -331,6 +331,7 @@ gudev_coldplug_cameras (GGPhoto2VolumeMonitor *monitor)
if (g_udev_device_has_property (d, "ID_GPHOTO2"))
gudev_add_camera (monitor, d, FALSE);
}
+ g_list_free_full (usb_devices, g_object_unref);
}
static GObject *
--
2.33.0

View File

@ -22,13 +22,17 @@
Name: gvfs
Version: 1.50.2
Release: 2
Release: 7
Summary: gvfs is a backends for the gio framework in GLib
License: GPLv3 and LGPLv2+ and BSD and MPLv2.0
URL: https://wiki.gnome.org/Projects/gvfs
Source0: https://download.gnome.org/sources/gvfs/1.50/gvfs-%{version}.tar.xz
# Modify memory leaks patch errors by backporting upstream patch
Patch01: 0001-Fix-memory-leaks-detected-by-valgrind.patch
BuildRequires: /usr/bin/ssh meson gcc libexif-devel gettext-devel docbook-style-xsl chrpath
BuildRequires: pkgconfig(dbus-1)
BuildRequires: pkgconfig(gcr-3)
@ -117,7 +121,9 @@ This package containers the headers and other files which are required for devel
chrpath -d %{buildroot}%{_libdir}/gio/modules/*.so
chrpath -d %{buildroot}%{_libdir}/gvfs/*.so
chrpath -d %{buildroot}%{_libexecdir}/gvfs*
chrpath -d %{buildroot}
mkdir -p %{buildroot}/etc/ld.so.conf.d
echo "%{_libdir}/gio/modules" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
echo "%{_libdir}/gvfs" >> %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf
# trashlib is GPLv3, include the license
cp -p daemon/trashlib/COPYING COPYING.GPL3
@ -127,6 +133,10 @@ cp -p daemon/trashlib/COPYING COPYING.GPL3
%post
# Reload .mount files:
killall -USR1 gvfsd >&/dev/null || :
/sbin/ldconfig
%postun
/sbin/ldconfig
%files
%{_datadir}/dbus-1/services/org.gtk.vfs.*.service
@ -136,7 +146,6 @@ killall -USR1 gvfsd >&/dev/null || :
%{_datadir}/glib-2.0/schemas/*.xml
%{_datadir}/polkit-1/actions/org.gtk.vfs.file-operations.policy
%{_datadir}/polkit-1/rules.d/org.gtk.vfs.file-operations.rules
%{_datadir}/gvfs/remote-volume-monitors/*.monitor
%{_libdir}/gvfs/libgvfsdaemon.so
%{_libexecdir}/gvfs-*
%{_libexecdir}/gvfsd
@ -149,6 +158,7 @@ killall -USR1 gvfsd >&/dev/null || :
%doc NEWS README.md
%{_libdir}/gvfs/libgvfscommon.so
%{_libdir}/gio/modules/*.so
%config(noreplace) /etc/ld.so.conf.d/*
%files devel
%{_includedir}/gvfs-client/gvfs/gvfs*.h
@ -162,6 +172,21 @@ killall -USR1 gvfsd >&/dev/null || :
%{_mandir}/man1/gvfsd-fuse.1*
%changelog
* Wed Apr 17 2024 Huang Yang <huangyang@loongson.cn> - 1.50.2-7
- Fix Error: File listed twice
* Fri Jan 12 2024 wangxiaomeng <wangxiaomeng@kylinos.cn> - 1.50.2-6
- Modify memory-leaks patch errors
* Thu Jul 20 2023 houlifei <houlifei@uniontech.com> - 1.50.2-5
- Fix memory leaks detected by valgrind
* Wed Mar 22 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 1.50.2-4
- add library path file to /etc/ld.so.conf.d
* Mon Mar 13 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 1.50.2-3
- delete invalid line
* Mon Mar 13 2023 lin zhang <lin.zhang@turbolinux.com.cn> - 1.50.2-2
- remove rpath