core: use strv_free_and_replace() at one more place

This commit is contained in:
Yu Watanabe 2020-08-15 18:26:23 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent 41bed67613
commit 8cc53fae36
1 changed files with 1 additions and 4 deletions

View File

@ -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) {