polkit: make bus_verify_polkit_async_registry_free() return Hashmap* with NULL

This commit is contained in:
Yu Watanabe
2021-12-14 19:39:39 +09:00
parent 372e8592c6
commit 3c2f847227
2 changed files with 6 additions and 3 deletions
+5 -2
View File
@@ -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
}
+1 -1
View File
@@ -8,4 +8,4 @@
int bus_test_polkit(sd_bus_message *call, int capability, const char *action, const char **details, uid_t good_user, bool *_challenge, sd_bus_error *e);
int bus_verify_polkit_async(sd_bus_message *call, int capability, const char *action, const char **details, bool interactive, uid_t good_user, Hashmap **registry, sd_bus_error *error);
void bus_verify_polkit_async_registry_free(Hashmap *registry);
Hashmap *bus_verify_polkit_async_registry_free(Hashmap *registry);