Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
f04631135c
!13 xfsdump: fix memory leak
From: @liuh0329 
Reviewed-by: @swf504 
Signed-off-by: @swf504
2024-03-23 09:19:11 +00:00
liuh
f910be7dad xfsdump: fix memory leak 2024-03-21 11:21:36 +08:00
openeuler-ci-bot
4abf3dccca
!12 upgrade xfsdump version to 3.1.12
From: @wguanghao 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2023-02-09 06:40:46 +00:00
wguanghao
f61660bfd9 upgrade xfsdump version to 3.1.12 2023-02-08 11:50:03 +08:00
openeuler-ci-bot
4948e4a474
!10 update xfsdump version to 3.1.11-1
From: @yangchen_guang 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-11-01 09:32:27 +00:00
yangchenguang
99bd0b68a3 update xfsdump version to 3.1.11-1 2022-10-31 19:49:54 +08:00
openeuler-ci-bot
86b494f475
!7 openEuler master版本xfsdump软件升级至v3.1.10
From: @hifi521 
Reviewed-by: @liuzhiqiang26 
Signed-off-by: @liuzhiqiang26
2022-07-18 07:25:19 +00:00
zhanchengbin
ffe47060be update xfsdump version to 3.1.10
Signed-off-by: zhanchengbin <zhanchengbin1@huawei.com>
2022-07-18 14:34:56 +08:00
openeuler-ci-bot
56d028d28c !4 xfsdump delete -S git from %autosetup, and delete BuildRequires git
From: @chenyanpanHW
Reviewed-by: @liuzhiqiang26
Signed-off-by: @liuzhiqiang26
2021-07-31 07:29:30 +00:00
chenyanpanHW
5da23a292d
delete -S git from %autosetup, and delete BuildRequires git 2021-07-31 11:00:34 +08:00
4 changed files with 69 additions and 4 deletions

View File

@ -0,0 +1,48 @@
From 577e51a5abdda97ffce73637d67f5f88d7e93ac7 Mon Sep 17 00:00:00 2001
From: Pavel Reichl <preichl@redhat.com>
Date: Thu, 14 Dec 2023 21:25:49 +0100
Subject: xfsdump: Fix memory leak
Fix memory leak found by coverity.
>>> CID 1554295: Resource leaks (RESOURCE_LEAK)
>>> Failing to save or free storage allocated by strdup(path) leaks it.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Pavel Reichl <preichl@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
---
restore/tree.c | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/restore/tree.c b/restore/tree.c
index 6f3180f5..4707fdc9 100644
--- a/restore/tree.c
+++ b/restore/tree.c
@@ -4977,9 +4977,22 @@ static int
mkdir_r(char *path)
{
struct stat sbuf;
+ char *path_copy;
+ int ret;
if (stat(path, &sbuf) < 0) {
- if (mkdir_r(dirname(strdup(path))) < 0)
+ path_copy = strdup(path);
+ if (!path_copy) {
+ mlog(MLOG_TRACE | MLOG_ERROR | MLOG_TREE,
+ _("unable to allocate memory for a path\n"));
+ mlog_exit(EXIT_ERROR, RV_ERROR);
+ exit(1);
+ }
+
+ ret = mkdir_r(dirname(path_copy));
+ free(path_copy);
+
+ if (ret < 0)
return -1;
return mkdir(path, 0755);
}
--
cgit 1.2.3-korg

BIN
xfsdump-3.1.12.tar.xz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +1,17 @@
Name: xfsdump Name: xfsdump
Version: 3.1.9 Version: 3.1.12
Release: 1 Release: 2
Summary: Tools create and restore for the XFS filesystem Summary: Tools create and restore for the XFS filesystem
License: GPLv2 License: GPLv2
URL: http://xfs.org URL: http://xfs.org
Source0: http://kernel.org/pub/linux/utils/fs/xfs/%{name}/%{name}-%{version}.tar.xz Source0: http://kernel.org/pub/linux/utils/fs/xfs/%{name}/%{name}-%{version}.tar.xz
BuildRequires: libtool, gettext, gawk, git BuildRequires: libtool, gettext, gawk
BuildRequires: xfsprogs-devel, ncurses-devel, libuuid-devel, libattr-devel BuildRequires: xfsprogs-devel, ncurses-devel, libuuid-devel, libattr-devel
Requires: xfsprogs, attr Requires: xfsprogs, attr
Patch0: 0001-xfsdump-fix-memory-leak.patch
%description %description
xfsdump tools create and restore backups of directory trees on XFS filesystems. xfsdump tools create and restore backups of directory trees on XFS filesystems.
@ -21,7 +23,7 @@ Requires: man
This contains man files for the using of xfsdump. This contains man files for the using of xfsdump.
%prep %prep
%autosetup -n %{name}-%{version} -p1 -S git %autosetup -n %{name}-%{version} -p1
%build %build
%configure %configure
@ -48,6 +50,21 @@ mkdir -p %{buildroot}/%{_sharedstatedir}/xfsdump/inventory
%changelog %changelog
* Wed Mar 20 2024 liuh <liuhuan01@kylinos.cn> - 3.1.12-2
- xfsdump: fix memory leak
* Wed Feb 8 2023 wuguanghao <wuguanghao3@huawei.com> - 3.1.12-1
- upgrade xfsdump version to 3.1.12-1
* Thu Oct 20 2022 yangchenguang <yangchenguang@uniontech.com> - 3.1.11-1
- update xfsdump version to 3.1.11-1
* Mon Jul 18 2022 zhanchengbin <zhanchengbin1@huawei.com> - 3.1.10-1
- update xfsdump version to 3.1.10-1
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 3.1.9-2
- DESC: delete -S git from %autosetup, and delete BuildRequires git
* Thu Jul 16 2020 wuguanghao <wuguanghao3@huawei.com> - 3.1.9-1 * Thu Jul 16 2020 wuguanghao <wuguanghao3@huawei.com> - 3.1.9-1
- update xfsdump version to 3.1.9-1 - update xfsdump version to 3.1.9-1