summaryrefslogtreecommitdiff
path: root/ext/repo_rpmdb.c
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2019-09-10 15:38:44 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2019-09-10 15:38:44 +0900
commit79b3a6b7ab494c5ff10e740fd147f21a04907907 (patch)
tree4d4a0edc3666922135d2d2a2e4a93dd2d695ce47 /ext/repo_rpmdb.c
parent26781f8c44b4495fba2d0f4a39fe6379b08f32ce (diff)
downloadlibsolv-79b3a6b7ab494c5ff10e740fd147f21a04907907.tar.gz
libsolv-79b3a6b7ab494c5ff10e740fd147f21a04907907.tar.bz2
libsolv-79b3a6b7ab494c5ff10e740fd147f21a04907907.zip
Imported Upstream version 0.7.2upstream/0.7.2
Diffstat (limited to 'ext/repo_rpmdb.c')
-rw-r--r--ext/repo_rpmdb.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/repo_rpmdb.c b/ext/repo_rpmdb.c
index a2d518f..9acb400 100644
--- a/ext/repo_rpmdb.c
+++ b/ext/repo_rpmdb.c
@@ -1661,9 +1661,8 @@ repo_add_rpmdb(Repo *repo, Repo *ref, int flags)
if (s)
{
/* oops, could not reuse. free it instead */
- repo_free_solvable(repo, s - pool->solvables, 1);
+ s = solvable_free(s, 1);
solvend--;
- s = 0;
}
/* now sort all solvables in the new solvstart..solvend block */
if (solvend - solvstart > 1)
@@ -2044,7 +2043,7 @@ repo_add_rpm(Repo *repo, const char *rpm, int flags)
s = pool_id2solvable(pool, repo_add_solvable(repo));
if (!rpmhead2solv(pool, repo, data, s, state.rpmhead, flags & ~(RPM_ADD_WITH_HDRID | RPM_ADD_WITH_PKGID)))
{
- repo_free_solvable(repo, s - pool->solvables, 1);
+ s = solvable_free(s, 1);
solv_chksum_free(chksumh, 0);
headfree(state.rpmhead);
return 0;
@@ -2096,7 +2095,7 @@ repo_add_rpm_handle(Repo *repo, void *rpmhandle, int flags)
s = pool_id2solvable(pool, repo_add_solvable(repo));
if (!rpmhead2solv(pool, repo, data, s, rpmhead, flags))
{
- repo_free_solvable(repo, s - pool->solvables, 1);
+ s = solvable_free(s, 1);
return 0;
}
if (!(flags & REPO_NO_INTERNALIZE))