From 94b6d96794f8fad35eb5ceb775a1859f5d786371 Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 26 Jul 2022 13:37:11 -0700 Subject: [PATCH] queue: unref pkg copy in flatten_dependency_set --- libpkgconf/queue.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libpkgconf/queue.c b/libpkgconf/queue.c index 61584d4..d11e03d 100644 --- a/libpkgconf/queue.c +++ b/libpkgconf/queue.c @@ -160,7 +160,9 @@ flatten_dependency_set(pkgconf_client_t *client, pkgconf_list_t *list) continue; if (pkg->serial == client->serial) - continue; + { + goto next; + } if (dep->match == NULL) { @@ -191,7 +193,8 @@ flatten_dependency_set(pkgconf_client_t *client, pkgconf_list_t *list) 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);