From 62608dfe0255547aed1c374457a9911c933b2f7d Mon Sep 17 00:00:00 2001 From: Dylan Baker Date: Tue, 2 Aug 2022 11:51:59 -0700 Subject: [PATCH] queue: don't flatten nothing If after removing duplicates there are no deps to flatten, return early. --- libpkgconf/queue.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libpkgconf/queue.c b/libpkgconf/queue.c index 1ef8c07..9149683 100644 --- a/libpkgconf/queue.c +++ b/libpkgconf/queue.c @@ -204,6 +204,9 @@ next: pkgconf_pkg_unref(client, pkg); } + if (deps == NULL) + return; + qsort(deps, dep_count, sizeof (void *), dep_sort_cmp); /* zero the list and start readding */