forked from ariadne/pkgconf
main: unref another pkg
parent
dbc8d248c7
commit
116e367525
12
cli/main.c
12
cli/main.c
|
@ -1162,7 +1162,7 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
if (required_module_version != NULL)
|
if (required_module_version != NULL)
|
||||||
{
|
{
|
||||||
pkgconf_pkg_t *pkg;
|
pkgconf_pkg_t *pkg = NULL;
|
||||||
pkgconf_node_t *node;
|
pkgconf_node_t *node;
|
||||||
pkgconf_list_t deplist = PKGCONF_LIST_INITIALIZER;
|
pkgconf_list_t deplist = PKGCONF_LIST_INITIALIZER;
|
||||||
|
|
||||||
|
@ -1195,12 +1195,14 @@ main(int argc, char *argv[])
|
||||||
|
|
||||||
ret = EXIT_FAILURE;
|
ret = EXIT_FAILURE;
|
||||||
cleanup:
|
cleanup:
|
||||||
|
if (pkg)
|
||||||
|
pkgconf_pkg_unref(&pkg_client, pkg);
|
||||||
pkgconf_dependency_free(&deplist);
|
pkgconf_dependency_free(&deplist);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
else if (required_exact_module_version != NULL)
|
else if (required_exact_module_version != NULL)
|
||||||
{
|
{
|
||||||
pkgconf_pkg_t *pkg;
|
pkgconf_pkg_t *pkg = NULL;
|
||||||
pkgconf_node_t *node;
|
pkgconf_node_t *node;
|
||||||
pkgconf_list_t deplist = PKGCONF_LIST_INITIALIZER;
|
pkgconf_list_t deplist = PKGCONF_LIST_INITIALIZER;
|
||||||
|
|
||||||
|
@ -1233,12 +1235,14 @@ cleanup:
|
||||||
|
|
||||||
ret = EXIT_FAILURE;
|
ret = EXIT_FAILURE;
|
||||||
cleanup2:
|
cleanup2:
|
||||||
|
if (pkg)
|
||||||
|
pkgconf_pkg_unref(&pkg_client, pkg);
|
||||||
pkgconf_dependency_free(&deplist);
|
pkgconf_dependency_free(&deplist);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
else if (required_max_module_version != NULL)
|
else if (required_max_module_version != NULL)
|
||||||
{
|
{
|
||||||
pkgconf_pkg_t *pkg;
|
pkgconf_pkg_t *pkg = NULL;
|
||||||
pkgconf_node_t *node;
|
pkgconf_node_t *node;
|
||||||
pkgconf_list_t deplist = PKGCONF_LIST_INITIALIZER;
|
pkgconf_list_t deplist = PKGCONF_LIST_INITIALIZER;
|
||||||
|
|
||||||
|
@ -1271,6 +1275,8 @@ cleanup2:
|
||||||
|
|
||||||
ret = EXIT_FAILURE;
|
ret = EXIT_FAILURE;
|
||||||
cleanup3:
|
cleanup3:
|
||||||
|
if (pkg)
|
||||||
|
pkgconf_pkg_unref(&pkg_client, pkg);
|
||||||
pkgconf_dependency_free(&deplist);
|
pkgconf_dependency_free(&deplist);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue