diff --git a/backport-Fix-memory-leak-regressions-in-popt-1.18.patch b/backport-Fix-memory-leak-regressions-in-popt-1.18.patch deleted file mode 100644 index bbc58085fca61cc0a37a7f0ad4dcbed8315a26ca..0000000000000000000000000000000000000000 --- a/backport-Fix-memory-leak-regressions-in-popt-1.18.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 7182e4618ad5a0186145fc2aa4a98c2229afdfa8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= -Date: Wed, 5 Jan 2022 14:51:55 +0100 -Subject: [PATCH] Fix memory leak regressions in popt 1.18 - -Fix memory leak regression introduced in commit -7219e1ddc1e8606dda18c1105df0d45d8e8e0e09. Free the actual content, not -the array multiple times, and free on reset. ---- - src/popt.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/popt.c b/src/popt.c -index 0521c8d..f3f26a3 100644 ---- a/src/popt.c -+++ b/src/popt.c -@@ -216,6 +216,9 @@ 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; -@@ -1534,7 +1537,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.27.0 - diff --git a/popt.spec b/popt.spec index cebf83be01d167af3b58563aa1ef47298ecce40e..238dff58ac28c718b0927b04059c1d67b0b74e13 100644 --- a/popt.spec +++ b/popt.spec @@ -1,6 +1,6 @@ Name: popt Version: 1.18 -Release: 2 +Release: 3 Summary: C library for parsing command line parameters License: MIT URL: http://github.com/rpm-software-management/popt @@ -12,7 +12,6 @@ Patch2: fix-permit-reading-aliases-remove-left-over-goto-exi.patch Patch3: fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch Patch4: backport-Consider-POPT_CONTEXT_KEEP_FIRST-during-reset.patch Patch5: backport-Fix-incorrect-handling-of-leftovers-with-poptStuffAr.patch -Patch6: backport-Fix-memory-leak-regressions-in-popt-1.18.patch BuildRequires: gcc git gettext @@ -82,6 +81,9 @@ make check %{_mandir}/man3/%{name}.3.gz %changelog +* Thu Aug 18 2022 zhangruifang - 1.18-3 +- Revert fix memory leak regressions in popt + * Mon Aug 15 2022 panxiaohe - 1.18-2 - Fix incorrect handling of leftovers with poptStuffArgs and memory leak