From: Yu Watanabe Date: Wed, 3 Oct 2018 18:20:35 +0000 (+0900) Subject: sd-netlink: fix error handling in sd_netlink_call_async() X-Git-Tag: v240~571^2~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f6bdbd9e00ceb51dd23af584d9c6b4f61f6fa71f;p=thirdparty%2Fsystemd.git sd-netlink: fix error handling in sd_netlink_call_async() --- diff --git a/src/libsystemd/sd-netlink/sd-netlink.c b/src/libsystemd/sd-netlink/sd-netlink.c index 08b57073510..678f36c377b 100644 --- a/src/libsystemd/sd-netlink/sd-netlink.c +++ b/src/libsystemd/sd-netlink/sd-netlink.c @@ -542,7 +542,7 @@ int sd_netlink_call_async(sd_netlink *nl, if (c->timeout != 0) { r = prioq_put(nl->reply_callbacks_prioq, c, &c->prioq_idx); - if (r > 0) { + if (r < 0) { c->timeout = 0; sd_netlink_call_async_cancel(nl, c->serial); return r;