]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-device: fix segfault when error occurs in device_new_from_{nulstr,strv}()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 22 Dec 2018 18:06:47 +0000 (03:06 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 30 Dec 2018 13:47:20 +0000 (22:47 +0900)
commit18fee12a2d489378a2a9b647db0d0eb8c43f5362
treef00d22d262c8350543195e3c72da0a536ec845f9
parent04ca4d191b13e79e5701ed22dc972f08628d7bcc
sd-device: fix segfault when error occurs in device_new_from_{nulstr,strv}()

As devpath may not be set yet.

When debug logging is enabled, log_device_*() calls
sd_device_get_sysname(). So, we should not assume that devpath is always
set.

Fixes #11258.
src/libsystemd/sd-device/sd-device.c