diff --git a/backport-Fix-poptFreeContext-return-type-in-the-man-page.patch b/backport-Fix-poptFreeContext-return-type-in-the-man-page.patch new file mode 100644 index 0000000000000000000000000000000000000000..55125960560979d96c43f5785fdc97f095b7d55f --- /dev/null +++ b/backport-Fix-poptFreeContext-return-type-in-the-man-page.patch @@ -0,0 +1,41 @@ +From 7a5e1d54f183f40374e43003e978de3df29b4635 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen +Date: Thu, 19 Sep 2024 12:12:17 +0300 +Subject: [PATCH] Fix poptFreeContext() return type in the man page + +poptFreeContext() has returned explicit NULL since forever (at least +popt 1.13, didn't bother checking earlier) +--- + popt.3 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/popt.3 b/popt.3 +index 8b8f10f..39b07c9 100644 +--- a/popt.3 ++++ b/popt.3 +@@ -12,7 +12,7 @@ popt \- Parse command line options + .BI " const struct poptOption * " options , + .BI " unsigned int " flags ); + .sp +-.BI "void poptFreeContext(poptContext " con ); ++.BI "poptContext poptFreeContext(poptContext " con ); + .sp + .BI "void poptResetContext(poptContext " con ); + .sp +@@ -350,14 +350,14 @@ When argument processing is complete, the process should free the + .BR poptContext " as it contains dynamically allocated components. The " + .BR poptFreeContext() " function takes a " + .BR poptContext " as its sole argument and frees the resources the " +-context is using. ++context is using. It always returns NULL for convenience. + .sp + .RB "Here are the prototypes of both " poptResetContext() " and " + .BR poptFreeContext() : + .sp + .nf + .B #include +-.BI "void poptFreeContext(poptContext " con ");" ++.BI "poptContext poptFreeContext(poptContext " con ");" + .BI "void poptResetContext(poptContext " con ");" + .fi + .sp diff --git a/popt.spec b/popt.spec index 9add433c376f9a5e635bd19bdb5a8e7b2bb2f8b9..0bbc557f05ddd292c16241f10077ce250b6ad7ef 100644 --- a/popt.spec +++ b/popt.spec @@ -1,6 +1,6 @@ Name: popt Version: 1.19 -Release: 4 +Release: 5 Summary: C library for parsing command line parameters License: MIT URL: https://github.com/rpm-software-management/popt/ @@ -13,6 +13,7 @@ Patch3: fix-coverity-CID-1057440-Unused-pointer-value-UNUSED.patch Patch4: Fix-poptCallbackType-documentation.patch Patch5: Fix-multiple-typos-in-comments.patch Patch6: Fix-potential-double-free-in-test3.c.patch +Patch7: backport-Fix-poptFreeContext-return-type-in-the-man-page.patch Patch9000: revert-fix-memory-leak-regressions-in-popt.patch @@ -71,6 +72,9 @@ mkdir -p %{buildroot}/%{_sysconfdir}/popt.d %{_mandir}/man3/* %changelog +* Tue Jul 22 2025 liuzhilin - 1.19-5 +- backport Fix poptFreeContext() return type in the man page + * Fri Aug 16 2024 zhangxingrong - 1.19-4 - Fix poptCallbackType documentation - Fix multiple typos in comments