diff --git a/0001-test.patch b/0001-test.patch new file mode 100644 index 0000000000000000000000000000000000000000..2f1bd5174c0ebf3f999c014bd763b2e02d6edf07 --- /dev/null +++ b/0001-test.patch @@ -0,0 +1,57 @@ +From fc8ae921abbe3f0294ca1232bcdf65c6b4434e32 Mon Sep 17 00:00:00 2001 +From: yanshuai01 +Date: Thu, 24 Oct 2024 12:49:11 +0800 +Subject: [PATCH] test + +--- + ...mstats-Fix-memory-leak-on-error-path.patch | 25 +++++++++++++++++++ + libdm/libdevmapper.h | 1 + + 2 files changed, 26 insertions(+) + create mode 100644 0001-dmstats-Fix-memory-leak-on-error-path.patch + +diff --git a/0001-dmstats-Fix-memory-leak-on-error-path.patch b/0001-dmstats-Fix-memory-leak-on-error-path.patch +new file mode 100644 +index 0000000..2962fc9 +--- /dev/null ++++ b/0001-dmstats-Fix-memory-leak-on-error-path.patch +@@ -0,0 +1,25 @@ ++From d1f0b89e65fd8817930bbf89051fe03efb0a1db5 Mon Sep 17 00:00:00 2001 ++From: Marian Csontos ++Date: Tue, 28 Nov 2023 21:41:35 +0100 ++Subject: [PATCH] dmstats: Fix memory leak on error path ++ ++--- ++ libdm/libdm-stats.c | 2 +- ++ 1 file changed, 1 insertion(+), 1 deletion(-) ++ ++diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c ++index dc2907f..62be5de 100644 ++--- a/libdm/libdm-stats.c +++++ b/libdm/libdm-stats.c ++@@ -1970,7 +1970,7 @@ static int _stats_create_region(struct dm_stats *dms, uint64_t *region_id, ++ (strlen(hist_arg)) ? HISTOGRAM_ARG : "", ++ hist_arg)) < 0) { ++ log_error(err_fmt, PRECISE_ARG " option."); ++- return 0; +++ goto out; ++ } ++ } else ++ opt_args = dm_strdup(""); ++-- ++2.27.0 ++ +diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h +index c1c6cb4..e3a935c 100644 +--- a/libdm/libdevmapper.h ++++ b/libdm/libdevmapper.h +@@ -68,6 +68,7 @@ typedef void (*dm_log_with_errno_fn) (int level, const char *file, int line, + + void dm_log_with_errno_init(dm_log_with_errno_fn fn); + void dm_log_init_verbose(int level); ++//test + + /* + * Original version of this function. +-- +2.27.0 + diff --git a/lvm2.spec b/lvm2.spec index dcb9ec8176e13f76a98d649b7e9ffd601d1dd393..f42cd170d0c1aba786d198ff0f78bc3afc16927f 100644 --- a/lvm2.spec +++ b/lvm2.spec @@ -43,7 +43,7 @@ Name: lvm2 Version: 2.03.21 -Release: 11 +Release: 13 Epoch: 8 Summary: Tools for logical volume management License: GPLv2+ and LGPLv2.1 and BSD @@ -70,6 +70,7 @@ Patch18: 0018-do-not-pass-empty-string-in-callback.patch Patch19: 0019-fix-memleak-in-vgchange.patch Patch20: 0020-udev-create-dev-disk-by-label-symlinks-for-DM-devs-t.patch Patch21: 0021-lvmcache-fix-memleaks-on-list-removal.patch +Patch22: 0001-test.patch BuildRequires: gcc BuildRequires: gcc-c++ @@ -496,6 +497,9 @@ fi %changelog +* Tue Aug 6 2024 yanshuai - 8:2.03.21-13 +- lvmcache: test + * Tue Aug 6 2024 kouwenqi - 8:2.03.21-11 - lvmcache: fix memleaks on list removal