diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-14 11:36:34 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-12-14 11:39:39 +0100 |
commit | 3c2f847227bd4d6e53a9c7d4518f82e072808e86 (patch) | |
tree | 91e066bba02642d21e712a0ded29c9b69442b3b3 /src/shared/bus-polkit.c | |
parent | wait-online: also use address state even when operational state is below degr... (diff) | |
download | systemd-3c2f847227bd4d6e53a9c7d4518f82e072808e86.tar.xz systemd-3c2f847227bd4d6e53a9c7d4518f82e072808e86.zip |
polkit: make bus_verify_polkit_async_registry_free() return Hashmap* with NULL
Diffstat (limited to 'src/shared/bus-polkit.c')
-rw-r--r-- | src/shared/bus-polkit.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/shared/bus-polkit.c b/src/shared/bus-polkit.c index 14122e0876..bbe04bea37 100644 --- a/src/shared/bus-polkit.c +++ b/src/shared/bus-polkit.c @@ -408,8 +408,11 @@ int bus_verify_polkit_async( return -EACCES; } -void bus_verify_polkit_async_registry_free(Hashmap *registry) { +Hashmap *bus_verify_polkit_async_registry_free(Hashmap *registry) { #if ENABLE_POLKIT - hashmap_free_with_destructor(registry, async_polkit_query_free); + return hashmap_free_with_destructor(registry, async_polkit_query_free); +#else + assert(hashmap_isempty(registry)); + return hashmap_free(registry); #endif } |