From 1e48b99fca3d812c055ee66eecf40709764570cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=82=96=E5=9C=A8?= Date: Mon, 21 Oct 2024 14:51:15 +0800 Subject: [PATCH] fix memory leak in repart --- backport-repart-fix-memory-leak.patch | 24 ++++++++++++++++++++++++ systemd.spec | 6 +++++- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 backport-repart-fix-memory-leak.patch diff --git a/backport-repart-fix-memory-leak.patch b/backport-repart-fix-memory-leak.patch new file mode 100644 index 0000000..5b87d38 --- /dev/null +++ b/backport-repart-fix-memory-leak.patch @@ -0,0 +1,24 @@ +From a81f5ffd40081441dafc678fe83d185436dde35a Mon Sep 17 00:00:00 2001 +From: Antonio Alvarez Feijoo +Date: Tue, 18 Jun 2024 14:07:50 +0200 +Subject: [PATCH 7351/9500] repart: fix memory leak + +--- + src/partition/repart.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/partition/repart.c b/src/partition/repart.c +index 473c83a..7ba2aad 100644 +--- a/src/partition/repart.c ++++ b/src/partition/repart.c +@@ -181,6 +181,7 @@ STATIC_DESTRUCTOR_REGISTER(arg_tpm2_hash_pcr_values, freep); + STATIC_DESTRUCTOR_REGISTER(arg_tpm2_public_key, freep); + STATIC_DESTRUCTOR_REGISTER(arg_tpm2_pcrlock, freep); + STATIC_DESTRUCTOR_REGISTER(arg_filter_partitions, freep); ++STATIC_DESTRUCTOR_REGISTER(arg_defer_partitions, freep); + STATIC_DESTRUCTOR_REGISTER(arg_image_policy, image_policy_freep); + STATIC_DESTRUCTOR_REGISTER(arg_copy_from, strv_freep); + STATIC_DESTRUCTOR_REGISTER(arg_copy_source, freep); +-- +2.33.0 + diff --git a/systemd.spec b/systemd.spec index 70fb713..8b8fba4 100644 --- a/systemd.spec +++ b/systemd.spec @@ -25,7 +25,7 @@ Name: systemd Url: https://systemd.io/ Version: 255 -Release: 27 +Release: 28 License: MIT and LGPLv2+ and GPLv2+ Summary: System and Service Manager @@ -129,6 +129,7 @@ Patch9057: add-a-new-switch-to-control-whether-udev-complies-wi.patch Patch9058: journal-don-t-enable-systemd-journald-audit.socket.patch Patch9801: Systemd-Add-sw64-architecture.patch +Patch9802: backport-repart-fix-memory-leak.patch BuildRequires: gcc, gcc-c++ BuildRequires: libcap-devel, libmount-devel, pam-devel, libselinux-devel @@ -1664,6 +1665,9 @@ fi %{_unitdir}/veritysetup.target %changelog +* Mon Dec 09 2024 zhangyao - 255-28 +- DESC:fix memory leak in src/partition/repart.c + * Mon Dec 09 2024 zhangyao - 255-27 - DESC:network networkd address does not set up firewall rules add backport-network-networkd-address-don-t-set-up-firewall-rules.patch -- Gitee