diff --git a/pkg.c b/pkg.c index eee3381..a35c7d5 100644 --- a/pkg.c +++ b/pkg.c @@ -215,7 +215,7 @@ cleanup: void pkg_free(pkg_t *pkg) { - if (pkg == NULL) + if (pkg == NULL || pkg->flags & PKG_PROPF_VIRTUAL) return; pkg_dependency_free(pkg->requires); @@ -228,9 +228,6 @@ pkg_free(pkg_t *pkg) pkg_tuple_free(pkg->vars); - if (pkg->flags & PKG_PROPF_VIRTUAL) - return; - if (pkg->id != NULL) free(pkg->id); @@ -520,6 +517,10 @@ static pkg_t pkg_config_virtual = { .url = PACKAGE_BUGREPORT, .version = PKG_PKGCONFIG_VERSION_EQUIV, .flags = PKG_PROPF_VIRTUAL, + .vars = &(pkg_tuple_t){ + .key = "pc_path", + .value = PKG_DEFAULT_PATH, + }, }; /*