udev-manager: actually remove the property

AFAICT there's no reason to keep removed entries in the Hashmap
(although it doesn't break anything either). The only use of this
hashmap is in udev_rule_apply_token_to_event(), which just retrieves the
value using hashmap_get(), hence there's no difference there between an
existing entry with a NULL value and a missing entry.
This commit is contained in:
David Tardon
2023-11-08 14:41:28 +01:00
parent c62345ffc7
commit e1593039db
+2 -8
View File
@@ -918,15 +918,9 @@ static int on_ctrl_msg(UdevCtrl *uctrl, UdevCtrlMessageType type, const UdevCtrl
}
eq++;
if (isempty(eq)) {
if (isempty(eq))
log_debug("Received udev control message (ENV), unsetting '%s'", key);
r = hashmap_put(manager->properties, key, NULL);
if (r < 0) {
log_oom();
return 1;
}
} else {
else {
val = strdup(eq);
if (!val) {
log_oom();