From: Yu Watanabe Date: Thu, 11 Aug 2022 19:19:27 +0000 (+0900) Subject: sd-device-monitor: actually refuse to send invalid devices X-Git-Tag: v252-rc1~465^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8bb4989906a1659b0f6adfa03dc7585e294a392b;p=thirdparty%2Fsystemd.git sd-device-monitor: actually refuse to send invalid devices Fixes an issue introduced by 9e79123884a36ce095b98d1c0fe247dddf02dbec. --- diff --git a/src/libsystemd/sd-device/device-monitor.c b/src/libsystemd/sd-device/device-monitor.c index 47a5d85886a..c179c116bb6 100644 --- a/src/libsystemd/sd-device/device-monitor.c +++ b/src/libsystemd/sd-device/device-monitor.c @@ -578,8 +578,8 @@ int device_monitor_send_device( if (r < 0) return log_device_debug_errno(device, r, "sd-device-monitor: Failed to get device properties: %m"); if (blen < 32) - log_device_debug_errno(device, SYNTHETIC_ERRNO(EINVAL), - "sd-device-monitor: Length of device property nulstr is too small to contain valid device information"); + return log_device_debug_errno(device, SYNTHETIC_ERRNO(EINVAL), + "sd-device-monitor: Length of device property nulstr is too small to contain valid device information"); /* fill in versioned header */ r = sd_device_get_subsystem(device, &val);