revert: fix memory leak regressions in popt
This commit is contained in:
parent
2256d09cc2
commit
69e9706467
@ -1,6 +1,6 @@
|
|||||||
Name: popt
|
Name: popt
|
||||||
Version: 1.19
|
Version: 1.19
|
||||||
Release: 1
|
Release: 2
|
||||||
Summary: C library for parsing command line parameters
|
Summary: C library for parsing command line parameters
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/rpm-software-management/popt/
|
URL: https://github.com/rpm-software-management/popt/
|
||||||
@ -11,6 +11,8 @@ Patch1: fix-handle-newly-added-asset-.-call-like-elsewhere.patch
|
|||||||
Patch2: fix-permit-reading-aliases-remove-left-over-goto-exi.patch
|
Patch2: fix-permit-reading-aliases-remove-left-over-goto-exi.patch
|
||||||
Patch3: fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch
|
Patch3: fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch
|
||||||
|
|
||||||
|
Patch9000: revert-fix-memory-leak-regressions-in-popt.patch
|
||||||
|
|
||||||
BuildRequires: gcc git gettext
|
BuildRequires: gcc git gettext
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -79,6 +81,9 @@ make check
|
|||||||
%{_mandir}/man3/%{name}.3.gz
|
%{_mandir}/man3/%{name}.3.gz
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Dec 13 2022 Jiayi Chen <1398871225@qq.com> - 1.19-2
|
||||||
|
- Revert fix memory leak regressions in popt introduced by updating to 1.19
|
||||||
|
|
||||||
* Fri Nov 18 2022 dillon chen <dillon.chen@gmail.com> - 1.19-1
|
* Fri Nov 18 2022 dillon chen <dillon.chen@gmail.com> - 1.19-1
|
||||||
- update to 1.19
|
- update to 1.19
|
||||||
|
|
||||||
|
|||||||
41
revert-fix-memory-leak-regressions-in-popt.patch
Normal file
41
revert-fix-memory-leak-regressions-in-popt.patch
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
From 3258b29e47ec0113048070f72a63a14b6e6437eb Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jiayi Chen <1398871225@qq.com>
|
||||||
|
Date: Tue, 13 Dec 2022 16:09:46 +0800
|
||||||
|
Subject: [PATCH] revert: fix memory leak regressions in popt
|
||||||
|
|
||||||
|
Revert a previous patch in commit 7219e1ddc1e8606dda18c1105df0d45d8e8e0e09,
|
||||||
|
which will cause some problems.
|
||||||
|
|
||||||
|
This patch is automatically introduced by updating version to 1.19.
|
||||||
|
|
||||||
|
https://gitee.com/src-openeuler/popt/issues/I5PL76
|
||||||
|
---
|
||||||
|
src/popt.c | 5 +----
|
||||||
|
1 file changed, 1 insertion(+), 4 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/popt.c b/src/popt.c
|
||||||
|
index 5710f80..9908ba4 100644
|
||||||
|
--- a/src/popt.c
|
||||||
|
+++ b/src/popt.c
|
||||||
|
@@ -216,9 +216,6 @@ void poptResetContext(poptContext con)
|
||||||
|
else
|
||||||
|
con->os->next = 0;
|
||||||
|
|
||||||
|
- for (i = 0; i < con->numLeftovers; i++) {
|
||||||
|
- con->leftovers[i] = _free(con->leftovers[i]);
|
||||||
|
- }
|
||||||
|
con->numLeftovers = 0;
|
||||||
|
con->nextLeftover = 0;
|
||||||
|
con->restLeftover = 0;
|
||||||
|
@@ -1537,7 +1534,7 @@ poptContext poptFreeContext(poptContext con)
|
||||||
|
con->numExecs = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < con->numLeftovers; i++) {
|
||||||
|
- con->leftovers[i] = _free(con->leftovers[i]);
|
||||||
|
+ con->leftovers[i] = _free(&con->leftovers[i]);
|
||||||
|
}
|
||||||
|
con->leftovers = _free(con->leftovers);
|
||||||
|
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user