diff --git a/libpkgconf/queue.c b/libpkgconf/queue.c index 4db6ac1..550ea3e 100644 --- a/libpkgconf/queue.c +++ b/libpkgconf/queue.c @@ -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.