From 30781757e3429e91b8173569e9c2c5796d1daed5 Mon Sep 17 00:00:00 2001 From: Alexis Date: Fri, 28 Dec 2018 17:09:25 +0100 Subject: [PATCH] revert: prefer nl_send_sync --- src/modules/network.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/network.cpp b/src/modules/network.cpp index e3c8a088..c593648a 100644 --- a/src/modules/network.cpp +++ b/src/modules/network.cpp @@ -494,9 +494,8 @@ auto waybar::modules::Network::getInfo() -> void if (genlmsg_put(nl_msg, NL_AUTO_PORT, NL_AUTO_SEQ, nl80211_id_, 0, NLM_F_DUMP, NL80211_CMD_GET_SCAN, 0) == nullptr || nla_put_u32(nl_msg, NL80211_ATTR_IFINDEX, ifid_) < 0) { - goto msg_free; + nlmsg_free(nl_msg); + return; } - nl_send_auto(sk_, nl_msg); -msg_free: - nlmsg_free(nl_msg); + nl_send_sync(sk_, nl_msg); }