From 79b3a6b7ab494c5ff10e740fd147f21a04907907 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Tue, 10 Sep 2019 15:38:44 +0900 Subject: Imported Upstream version 0.7.2 --- ext/repo_rpmdb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'ext/repo_rpmdb.c') 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)) -- cgit v1.2.3