queue: ensure the initial solution is cleaned up when it is no longer needed
ci/woodpecker/push/woodpecker Pipeline was successful
Details
ci/woodpecker/push/woodpecker Pipeline was successful
Details
parent
d0038689fd
commit
5fb09af863
|
@ -229,20 +229,28 @@ static inline unsigned int
|
|||
pkgconf_queue_verify(pkgconf_client_t *client, pkgconf_pkg_t *world, pkgconf_list_t *list, int maxdepth)
|
||||
{
|
||||
unsigned int result;
|
||||
|
||||
|
||||
pkgconf_pkg_t initial_world = {
|
||||
.id = "virtual:world",
|
||||
.realname = "virtual world package",
|
||||
.flags = PKGCONF_PKG_PROPF_STATIC | PKGCONF_PKG_PROPF_VIRTUAL,
|
||||
};
|
||||
|
||||
if (!pkgconf_queue_compile(client, &initial_world, list))
|
||||
{
|
||||
pkgconf_solution_free(client, &initial_world);
|
||||
return PKGCONF_PKG_ERRF_DEPGRAPH_BREAK;
|
||||
}
|
||||
|
||||
/* collect all the dependencies */
|
||||
result = pkgconf_pkg_traverse(client, &initial_world, pkgconf_queue_collect_dependents, world, maxdepth, 0);
|
||||
if (result != PKGCONF_PKG_ERRF_OK)
|
||||
{
|
||||
pkgconf_solution_free(client, &initial_world);
|
||||
return result;
|
||||
}
|
||||
|
||||
/* free the initial solution */
|
||||
pkgconf_solution_free(client, &initial_world);
|
||||
|
||||
/* flatten the dependency set using serials.
|
||||
* we copy the dependencies to a vector, and then erase the list.
|
||||
|
|
Loading…
Reference in New Issue