public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Panu Matilainen <pmatilai@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/rpm] pmatilai-v6: - don't hang because of leftover query iterators (#246044)
Date: Mon, 23 Nov 2026 09:24:12 GMT	[thread overview]
Message-ID: <179542585279.1.8371616399507678087.rpms-rpm-66621c977c90@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/rpm
Branch : pmatilai-v6
Commit : 66621c977c90c2daaebc88b38e303e32c2940b73
Author : Panu Matilainen <pmatilai@fedoraproject.org>
Date   : 2007-06-28T12:02:23+00:00
Stats  : +31/-1 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/rpm/c/66621c977c90c2daaebc88b38e303e32c2940b73?branch=pmatilai-v6

Log:
- don't hang because of leftover query iterators (#246044)

---
diff --git a/rpm-4.4.2.1-rc1-query-iterators.patch b/rpm-4.4.2.1-rc1-query-iterators.patch
new file mode 100644
index 0000000..4aa1620
--- /dev/null
+++ b/rpm-4.4.2.1-rc1-query-iterators.patch
@@ -0,0 +1,25 @@
+changeset:   6070:7ca081cd83d8
+tag:         tip
+user:        Panu Matilainen <pmatilai@redhat.com>
+date:        Thu Jun 28 14:44:48 2007 +0300
+summary:     Remember to free up match iterators (rhbz#246044)
+
+diff -r a468a8443652 -r 7ca081cd83d8 lib/query.c
+--- a/lib/query.c	Wed Jun 27 16:29:16 2007 +0300
++++ b/lib/query.c	Thu Jun 28 14:44:48 2007 +0300
+@@ -680,10 +680,12 @@ int rpmQueryVerify(QVA_t qva, rpmts ts, 
+     case RPMQV_PACKAGE:
+     {
+ 	int matches = 0;
+-	qva->qva_mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0);
+-	while (rpmdbNextIterator(qva->qva_mi) != NULL) {
++	rpmdbMatchIterator mi;
++	mi = rpmtsInitIterator(ts, RPMDBI_LABEL, arg, 0);
++	while (rpmdbNextIterator(mi) != NULL) {
+ 	    matches++;
+ 	}
++	rpmdbFreeIterator(mi);
+ 	if (! matches) {
+ 	    rpmError(RPMERR_QUERYINFO, _("package %s is not installed\n"), arg);
+ 	    res = 1;
+

diff --git a/rpm.spec b/rpm.spec
index b7a9d0c..bd48497 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -14,7 +14,7 @@ Summary: The RPM package management system
 Name: rpm
 Version: 4.4.2.1
 %{expand: %%define rpm_version %{version}-rc1}
-Release: 0.2.rc1
+Release: 0.3.rc1
 Group: System Environment/Base
 Url: http://www.rpm.org/
 Source: rpm-%{rpm_version}.tar.gz
@@ -25,6 +25,7 @@ Patch4: rpm-4.4.2-devel-autodep.patch
 Patch5: rpm-4.4.2-rpmfc-skip.patch
 Patch6: rpm-4.4.2-matchpathcon.patch
 Patch7: rpm-4.4.2.1-rc1-poptver.patch
+Patch8: rpm-4.4.2.1-rc1-query-iterators.patch
 License: GPL
 Requires(pre): shadow-utils
 Requires(postun): shadow-utils
@@ -135,6 +136,7 @@ shell-like rules.
 %patch5 -p1 -b .fcskip
 %patch6 -p1 -b .matchpathcon
 %patch7 -p1 -b .poptver
+%patch8 -p1 -b .queryiter
 
 %build
 
@@ -429,6 +431,9 @@ exit 0
 %{__includedir}/popt.h
 
 %changelog
+* Thu Jun 28 2007 Panu Matilainen <pmatilai@redhat.com> 4.4.2.1-0.3.rc1
+- don't hang because of leftover query iterators (#246044)
+
 * Tue Jun 26 2007 Panu Matilainen <pmatilai@redhat.com> 4.4.2.1-0.2.rc1
 - patch popt version to 1.10.2.1 for clean upgrade path
 - popt release follows main package release again

                 reply	other threads:[~2026-11-23  9:24 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179542585279.1.8371616399507678087.rpms-rpm-66621c977c90@fedoraproject.org \
    --to=pmatilai@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox