]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
sd-device: fix possible use-of-uninitialized-value
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 17 Apr 2022 07:09:11 +0000 (16:09 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 17 Apr 2022 19:34:14 +0000 (04:34 +0900)
src/libsystemd/sd-device/device-private.c

index 47b62e7421a15c876ef969c77881aecd1e8f426c..42a5467b81ee9385daf9222f1297d00dcee9f0d2 100644 (file)
@@ -793,7 +793,7 @@ int device_rename(sd_device *device, const char *name) {
 
 int device_shallow_clone(sd_device *old_device, sd_device **new_device) {
         _cleanup_(sd_device_unrefp) sd_device *ret = NULL;
-        const char *val;
+        const char *val = NULL;
         int r;
 
         assert(old_device);