From afcac065c0f649ebcf0f450475a8d7c3bc776d14 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 3 Apr 2015 17:27:00 +0200 Subject: [PATCH] sd-device: initialize variable sysnum would not be initialized if sysname had no trailing digits. --- src/libsystemd/sd-device/sd-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsystemd/sd-device/sd-device.c b/src/libsystemd/sd-device/sd-device.c index da1052c8f..3179d16b2 100644 --- a/src/libsystemd/sd-device/sd-device.c +++ b/src/libsystemd/sd-device/sd-device.c @@ -930,7 +930,7 @@ _public_ int sd_device_get_devname(sd_device *device, const char **devname) { static int device_set_sysname(sd_device *device) { _cleanup_free_ char *sysname = NULL; - const char *sysnum; + const char *sysnum = NULL; const char *pos; size_t len = 0; -- 2.30.2