summaryrefslogtreecommitdiff
path: root/src/shared
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/bus-util.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/src/shared/bus-util.c b/src/shared/bus-util.c
index 0fb28c24d..81e1db34f 100644
--- a/src/shared/bus-util.c
+++ b/src/shared/bus-util.c
@@ -555,12 +555,7 @@ int bus_verify_polkit_async(
void bus_verify_polkit_async_registry_free(Hashmap *registry) {
#if ENABLE_POLKIT
- AsyncPolkitQuery *q;
-
- while ((q = hashmap_steal_first(registry)))
- async_polkit_query_free(q);
-
- hashmap_free(registry);
+ hashmap_free_with_destructor(registry, async_polkit_query_free);
#endif
}