summaryrefslogtreecommitdiff
path: root/src/core/device.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2020-08-15 18:26:23 +0900
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-15 09:36:34 +0200
commit8cc53fae3606cf65231b9f50e707c323c81e8b80 (patch)
treeba7c255a4fc780077c5478f15f3464a1b51bb7e8 /src/core/device.c
parent41bed676130d2917aaa5be267cc171da9bb021a8 (diff)
downloadsystemd-8cc53fae3606cf65231b9f50e707c323c81e8b80.tar.gz
core: use strv_free_and_replace() at one more place
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 31aa3341c2..595b009cd9 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -441,10 +441,7 @@ static int device_add_udev_wants(Unit *u, sd_device *dev) {
}
}
- strv_free(d->wants_property);
- d->wants_property = TAKE_PTR(added);
-
- return 0;
+ return strv_free_and_replace(d->wants_property, added);
}
static bool device_is_bound_by_mounts(Device *d, sd_device *dev) {