1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

bus-wait-for-units: use hashmap_remove_value where appropriate

This commit is contained in:
Mike Yuan 2024-01-01 17:15:23 +08:00
parent edba11cbd1
commit a490aa5a2d
No known key found for this signature in database
GPG Key ID: 417471C0A40F58B3

View File

@ -63,7 +63,7 @@ static WaitForItem *wait_for_item_free(WaitForItem *item) {
log_debug_errno(r, "Failed to drop reference to unit %s, ignoring: %m", item->bus_path);
}
assert_se(hashmap_remove(item->parent->items, item->bus_path) == item);
assert_se(hashmap_remove_value(item->parent->items, item->bus_path, item));
if (item->parent->current == item)
item->parent->current = NULL;