summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-03-22 14:45:49 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-03-22 14:45:49 +0200
commit36e4ef1a0adab54a9a06e9b1d6beff80a049d892 (patch)
treef7cd19758e18a2263f4165993af4f3a9d7e05490 /lib
parentc7f62698441b347920a3f9f7c9b53ed24bb89c25 (diff)
downloadlibrpm-tizen-36e4ef1a0adab54a9a06e9b1d6beff80a049d892.tar.gz
librpm-tizen-36e4ef1a0adab54a9a06e9b1d6beff80a049d892.tar.bz2
librpm-tizen-36e4ef1a0adab54a9a06e9b1d6beff80a049d892.zip
Take a transaction set reference on verified db iteration
- forward linking hasn't been an issue since >= 4.6.0...
Diffstat (limited to 'lib')
-rw-r--r--lib/rpmdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 65b7e2479..3edb35bfe 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -27,6 +27,7 @@
#include <rpm/rpmds.h> /* XXX isInstallPreReq macro only */
#include <rpm/rpmlog.h>
#include <rpm/rpmdb.h>
+#include <rpm/rpmts.h>
#include <rpm/argv.h>
#include "lib/rpmdb_internal.h"
@@ -1460,6 +1461,7 @@ rpmdbMatchIterator rpmdbFreeIterator(rpmdbMatchIterator mi)
mi->mi_set = dbiFreeIndexSet(mi->mi_set);
mi->mi_keyp = _free(mi->mi_keyp);
mi->mi_db = rpmdbUnlink(mi->mi_db);
+ mi->mi_ts = rpmtsFree(mi->mi_ts);
mi = _free(mi);
@@ -1816,8 +1818,7 @@ int rpmdbSetHdrChk(rpmdbMatchIterator mi, rpmts ts,
int rc = 0;
if (mi == NULL)
return 0;
- /* XXX forward linkage prevents rpmtsLink */
- mi->mi_ts = ts;
+ mi->mi_ts = rpmtsLink(ts);
mi->mi_hdrchk = hdrchk;
return rc;
}