From 6609001114daa3bf3780e944af669b627fb5a174 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Wed, 3 Aug 2022 16:08:00 -0700 Subject: [PATCH] queue: unref dependency in all cases --- libpkgconf/queue.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libpkgconf/queue.c b/libpkgconf/queue.c index 1c30f40..7e1d011 100644 --- a/libpkgconf/queue.c +++ b/libpkgconf/queue.c @@ -160,7 +160,7 @@ flatten_dependency_set(pkgconf_client_t *client, pkgconf_list_t *list) continue; if (pkg->serial == client->serial) - continue; + goto next; if (dep->match == NULL) { @@ -190,8 +190,8 @@ flatten_dependency_set(pkgconf_client_t *client, pkgconf_list_t *list) deps[dep_count - 1] = dep; PKGCONF_TRACE(client, "added %s to dep table", dep->package); - -next:; +next: + pkgconf_pkg_unref(client, pkg); } qsort(deps, dep_count, sizeof (void *), dep_sort_cmp);