1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00

sd-netlink: fix error handling in sd_netlink_call_async()

This commit is contained in:
Yu Watanabe 2018-10-04 03:20:35 +09:00
parent 3316429f19
commit f6bdbd9e00

View File

@ -542,7 +542,7 @@ int sd_netlink_call_async(sd_netlink *nl,
if (c->timeout != 0) { if (c->timeout != 0) {
r = prioq_put(nl->reply_callbacks_prioq, c, &c->prioq_idx); r = prioq_put(nl->reply_callbacks_prioq, c, &c->prioq_idx);
if (r > 0) { if (r < 0) {
c->timeout = 0; c->timeout = 0;
sd_netlink_call_async_cancel(nl, c->serial); sd_netlink_call_async_cancel(nl, c->serial);
return r; return r;