From 7d9ade50821ace9da1f40dae7e6e9caa548b41fa Mon Sep 17 00:00:00 2001 From: EulerOSWander <314264452@qq.com> Date: Sat, 27 Feb 2021 15:16:29 +0800 Subject: [PATCH] Sync patches from upstream Sync patches from upstream. Signed-off-by: EulerOSWander <314264452@qq.com> --- backport-0011-pgrep-Remove-memory-leak.patch | 34 ++++++++++++++++++++ procps-ng.spec | 6 +++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 backport-0011-pgrep-Remove-memory-leak.patch diff --git a/backport-0011-pgrep-Remove-memory-leak.patch b/backport-0011-pgrep-Remove-memory-leak.patch new file mode 100644 index 0000000..ff01277 --- /dev/null +++ b/backport-0011-pgrep-Remove-memory-leak.patch @@ -0,0 +1,34 @@ +From 5f859b30d34c3e1ec3fca48d55248b502669fcc5 Mon Sep 17 00:00:00 2001 +From: Craig Small +Date: Tue, 22 Dec 2020 16:08:49 +1100 +Subject: [PATCH] pgrep: Remove memory leak + +This is part of !118 where @tt.rantala found a memory leak. +The other part of !118 may come later if the performance change +is significant. + +References: + procps-ng/procps!118 +--- + pgrep.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pgrep.c b/pgrep.c +index 205a1db..4fe5e8a 100644 +--- a/pgrep.c ++++ b/pgrep.c +@@ -716,6 +716,11 @@ static struct el * select_procs (int *num) + free(cmdsearch); + free(cmdoutput); + ++ if (preg) { ++ regfree(preg); ++ free(preg); ++ } ++ + return list; + } + +-- +2.27.0 + diff --git a/procps-ng.spec b/procps-ng.spec index 2072fd0..ed685a8 100644 --- a/procps-ng.spec +++ b/procps-ng.spec @@ -1,6 +1,6 @@ Name: procps-ng Version: 3.3.16 -Release: 13 +Release: 14 Summary: Utilities that provide system information. License: GPL+ and GPLv2 and GPLv2+ and GPLv3+ and LGPLv2+ URL: https://sourceforge.net/projects/procps-ng/ @@ -19,6 +19,7 @@ Patch0006: backport-0007-Fixes-small-bug-in-struct-proc_t-documentation.patch Patch0007: backport-0008-misc-eliminate-a-couple-of-miscellaneous-gcc-warning.patch Patch0008: backport-0009-top-fix-potential-SEGV-when-no-tasks-were-displayabl.patch Patch0009: backport-0010-top-fix-additional-SEGVs-if-no-tasks-were-displayabl.patch +Patch0010: backport-0011-pgrep-Remove-memory-leak.patch Patch9000: feature-add-options-M-and-N-for-top.patch Patch9001: bugfix-top-exit-with-error-when-pid-overflow.patch @@ -104,6 +105,9 @@ ln -s %{_bindir}/pidof %{buildroot}%{_sbindir}/pidof %{_mandir}/translated %changelog +* Sat Feb 27 2021 hewenliang - 3.3.16-14 +- sync patches + * Thu Nov 03 2020 xinghe - 3.3.16-13 - sync patchs -- Gitee