summaryrefslogtreecommitdiff
path: root/src/udev
diff options
context:
space:
mode:
authorDaniel Mack <daniel@zonque.org>2015-07-29 20:25:57 +0200
committerDaniel Mack <daniel@zonque.org>2015-07-30 13:09:01 +0200
commit2fc09a9cdd1ad25bc7c53a23d5301eb952e1ce3d (patch)
treec662c5bf209dae93822ac07a831882a7ba4ba0b2 /src/udev
parent5f17089ac1e86c25806d3f066243561360efd2ca (diff)
tree-wide: use free_and_strdup()
Use free_and_strdup() where appropriate and replace equivalent, open-coded versions.
Diffstat (limited to 'src/udev')
-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),