mirror of
https://github.com/systemd/systemd.git
synced 2025-01-21 22:04:01 +03:00
udev: fix usage of udev_device_new_from_stat_rdev() in journalctl
The refactor in #9200 inadvertently dropped the variable assignment to traverse the device and its hierarchy in add_matches_for_device(). This was uncovered by Coverity (CID #1393310). Fix that by restoring the assignment. Tested: `journalctl /dev/sda` now filters journalctl output again.
This commit is contained in:
parent
ad119a3293
commit
fffafb2b5e
@ -207,6 +207,7 @@ static int add_matches_for_device(sd_journal *j, const char *devpath) {
|
||||
if (r < 0)
|
||||
return log_error_errno(r, "Failed to get udev device from devnum %u:%u: %m", major(st.st_rdev), minor(st.st_rdev));
|
||||
|
||||
d = device;
|
||||
while (d) {
|
||||
_cleanup_free_ char *match = NULL;
|
||||
const char *subsys, *sysname, *devnode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user