Compare commits
No commits in common. "8fe0b45208fe13f8e1ab731af933e0e0ba612c12" and "f0feb6af285163a3b12d857f2f6329bd6e0f558e" have entirely different histories.
8fe0b45208
...
f0feb6af28
@ -1,30 +0,0 @@
|
|||||||
From 1fa8d43007b31115342002ac675c905d9f18fbd9 Mon Sep 17 00:00:00 2001
|
|
||||||
From: David Teigland <teigland@redhat.com>
|
|
||||||
Date: Thu, 3 Mar 2022 09:39:52 -0600
|
|
||||||
Subject: [PATCH] sanlock: fix memory leak of lockspace renewal_history
|
|
||||||
|
|
||||||
Leak was in original commit for "sanlock: renewal history"
|
|
||||||
6313c709722b3ba63234a75d1651a160bf1728ee.
|
|
||||||
|
|
||||||
With the default renewal history size, each lockspace that
|
|
||||||
was created would leak about 4kb of memory.
|
|
||||||
---
|
|
||||||
src/lockspace.c | 2 ++
|
|
||||||
1 file changed, 2 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/src/lockspace.c b/src/lockspace.c
|
|
||||||
index 2ebc247..d23dccd 100644
|
|
||||||
--- a/src/lockspace.c
|
|
||||||
+++ b/src/lockspace.c
|
|
||||||
@@ -939,6 +939,8 @@ static void free_sp(struct space *sp)
|
|
||||||
{
|
|
||||||
if (sp->lease_status.renewal_read_buf)
|
|
||||||
free(sp->lease_status.renewal_read_buf);
|
|
||||||
+ if (sp->renewal_history)
|
|
||||||
+ free(sp->renewal_history);
|
|
||||||
free(sp);
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
1.8.3.1
|
|
||||||
|
|
||||||
@ -1,13 +0,0 @@
|
|||||||
diff --git a/reset/sanlk_reset.c b/reset/sanlk_reset.c
|
|
||||||
index 9e952ab..3453449 100644
|
|
||||||
--- a/reset/sanlk_reset.c
|
|
||||||
+++ b/reset/sanlk_reset.c
|
|
||||||
@@ -717,7 +717,7 @@ int main(int argc, char *argv[])
|
|
||||||
int c;
|
|
||||||
int option_index = 0;
|
|
||||||
|
|
||||||
- c = getopt_long(argc, argv, "hVi:g:w:b:R:D",
|
|
||||||
+ c = getopt_long(argc, argv, "hVi:g:w:b:R:t:D",
|
|
||||||
long_options, &option_index);
|
|
||||||
if (c == -1)
|
|
||||||
break;
|
|
||||||
BIN
sanlock-3.8.1.tar.gz
Normal file
BIN
sanlock-3.8.1.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
24
sanlock.spec
24
sanlock.spec
@ -1,15 +1,12 @@
|
|||||||
Name: sanlock
|
Name: sanlock
|
||||||
Version: 3.8.4
|
Version: 3.8.1
|
||||||
Release: 3
|
Release: 2
|
||||||
Summary: A shared storage lock manager
|
Summary: A shared storage lock manager
|
||||||
License: GPLv2 and GPLv2+ and LGPLv2+
|
License: GPLv2 and GPLv2+ and LGPLv2+
|
||||||
URL: https://pagure.io/sanlock/
|
URL: https://pagure.io/sanlock/
|
||||||
Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz
|
Source0: https://releases.pagure.org/sanlock/%{name}-%{version}.tar.gz
|
||||||
|
|
||||||
Patch1: 0001-sanlock-fix-memory-leak-of-lockspace-renewal_history.patch
|
BuildRequires: libblkid-devel libaio-devel python3 python3-devel systemd-units
|
||||||
Patch2: Add-sanlk-reset-command-t-options.patch
|
|
||||||
|
|
||||||
BuildRequires: libblkid-devel libaio-devel python3 python3-devel systemd-units gcc
|
|
||||||
Requires(pre): shadow
|
Requires(pre): shadow
|
||||||
Requires(post): systemd-units systemd-sysv
|
Requires(post): systemd-units systemd-sysv
|
||||||
Requires(preun): systemd-units
|
Requires(preun): systemd-units
|
||||||
@ -153,21 +150,6 @@ getent passwd sanlock > /dev/null || /usr/sbin/useradd \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Wed Mar 08 2023 xu_ping <xu_ping33@h-pattners.com> - 3.8.4-3
|
|
||||||
- fix sanlk-reset -t command error.
|
|
||||||
|
|
||||||
* Wed Oct 19 2022 lihaoxiang <lihaoxiang9@huawei.com> - 3.8.4-2
|
|
||||||
- sanlock:fix memory leak of lockspace renewal history
|
|
||||||
|
|
||||||
* Tue Nov 23 2021 yanglongkang <yanglongkang@huawei.com> - 3.8.4-1
|
|
||||||
- update to 3.8.4
|
|
||||||
|
|
||||||
* Tue Jun 29 2021 zhouwenpei <zhouwenpei1@huawei.com> - 3.8.2-2
|
|
||||||
- add buildrequire gcc.
|
|
||||||
|
|
||||||
* Thu Jan 14 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.2-1
|
|
||||||
- update package to 3.8.2
|
|
||||||
|
|
||||||
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.1-2
|
* Fri Oct 30 2020 yanglongkang <yanglongkang@huawei.com> - 3.8.1-2
|
||||||
- remove python2 dependency
|
- remove python2 dependency
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user