]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/device.c
Merge pull request #17549 from yuwata/tiny-fixes
[thirdparty/systemd.git] / src / core / device.c
index d242d15e3645d50c1de682679387eaa08962fe5a..9a1d88270d1de9aa41fd40d1aebeb5a13ed5e853 100644 (file)
@@ -1,4 +1,4 @@
-/* SPDX-License-Identifier: LGPL-2.1+ */
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
 
 #include <errno.h>
 #include <sys/epoll.h>
@@ -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) {