Use xbps_repo_release() where applicable.

This commit is contained in:
Juan RP 2020-04-19 11:09:05 +02:00
parent cb580a5c1a
commit debfcf1273
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368
5 changed files with 8 additions and 8 deletions

View File

@ -391,9 +391,9 @@ out:
earlyout:
if (repo)
xbps_repo_close(repo);
xbps_repo_release(repo);
if (stage)
xbps_repo_close(stage);
xbps_repo_release(stage);
xbps_repo_unlock(rlockfd, rlockfname);

View File

@ -172,9 +172,9 @@ index_clean(struct xbps_handle *xhp, const char *repodir, const bool hashcheck,
}
out:
xbps_repo_close(repo);
xbps_repo_release(repo);
if(stage)
xbps_repo_close(stage);
xbps_repo_release(stage);
xbps_repo_unlock(rlockfd, rlockfname);
return rv;

View File

@ -159,9 +159,9 @@ remove_obsoletes(struct xbps_handle *xhp, const char *repodir)
repos[0] = repo;
repos[1] = stage;
rv = xbps_array_foreach_cb_multi(xhp, array, NULL, cleaner_cb, repos);
xbps_repo_close(repo);
xbps_repo_release(repo);
if(stage)
xbps_repo_close(stage);
xbps_repo_release(stage);
xbps_object_release(array);
return rv;

View File

@ -248,7 +248,7 @@ out:
rsa = NULL;
}
if (repo)
xbps_repo_close(repo);
xbps_repo_release(repo);
return rv ? -1 : 0;
}

View File

@ -361,7 +361,7 @@ xbps_repo_open(struct xbps_handle *xhp, const char *url)
}
xbps_object_iterator_release(iter);
xbps_object_release(repo->idx);
xbps_repo_close(stage);
xbps_repo_release(stage);
repo->idx = idx;
return repo;
}