summaryrefslogtreecommitdiff
path: root/src/udev/udev-rules.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r--src/udev/udev-rules.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index d00f90afa6..bbb9f97226 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -2429,8 +2429,7 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
rules_str(rules, rule->rule.filename_off), rule->rule.filename_line);
break;
}
- free(event->name);
- event->name = strdup(name_str);
+ free_and_strdup(&event->name, name_str);
log_debug("NAME '%s' %s:%u",
event->name,
rules_str(rules, rule->rule.filename_off),