1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-06 12:58:22 +03:00

udev-node: make link_find_prioritized() return negative value when nothing found

Fixes a bug introduced by a2554acec652fc65c8ed0c6c1fede9ba8c3693b1.

Fixes RHBZ#1662303.
This commit is contained in:
Yu Watanabe 2019-01-09 02:46:03 +09:00 committed by Zbigniew Jędrzejewski-Szmek
parent c501ecd70c
commit 82d9ac23fd

View File

@ -181,6 +181,9 @@ static int link_find_prioritized(sd_device *dev, bool add, const char *stackdir,
priority = db_prio;
}
if (!target)
return -ENOENT;
*ret = TAKE_PTR(target);
return 0;
}