xbps_repo_close: only unlock the file lock if repo was opened as such.
If xbps_repo_open() was called with the lock arg set, xbps_repo_close() will now unlock the repo file lock, without the need to set it. This avoids the need to always unlock the file lock even if it wasn't locked previously. This also introduceds an ABI/API break, but this way it's cleaner.
This commit is contained in:
@ -98,7 +98,7 @@ xbps_rpool_release(struct xbps_handle *xhp _unused)
|
||||
|
||||
while ((repo = SIMPLEQ_FIRST(&rpool_queue))) {
|
||||
SIMPLEQ_REMOVE(&rpool_queue, repo, xbps_repo, entries);
|
||||
xbps_repo_close(repo, true);
|
||||
xbps_repo_close(repo);
|
||||
free(repo);
|
||||
}
|
||||
if (xhp->repositories)
|
||||
|
Reference in New Issue
Block a user