diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-01-09 02:46:03 +0900 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2019-01-08 19:21:44 +0100 |
commit | 82d9ac23fd5ab2befe2a95187640a8d38799dd64 (patch) | |
tree | f02a01e50895dcb7b529edd548345d77234e4ce9 /src | |
parent | c501ecd70c61f5569bb775be62612521aa53f878 (diff) | |
download | systemd-82d9ac23fd5ab2befe2a95187640a8d38799dd64.tar.gz |
udev-node: make link_find_prioritized() return negative value when nothing found
Fixes a bug introduced by a2554acec652fc65c8ed0c6c1fede9ba8c3693b1.
Fixes RHBZ#1662303.
Diffstat (limited to 'src')
-rw-r--r-- | src/udev/udev-node.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c index c11eb8c1ac..c77010c09b 100644 --- a/src/udev/udev-node.c +++ b/src/udev/udev-node.c @@ -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; } |