luci-lib-ip: fix netlink receiving in link()

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
Jo-Philipp Wich 2015-01-24 14:25:53 +01:00
parent 40066a6799
commit eb1ef783f6

View file

@ -1270,7 +1270,9 @@ static int link_get(lua_State *L)
lua_newtable(L);
nl_send_auto_complete(sock, msg);
nl_recvmsgs(sock, cb);
while (st.pending > 0)
nl_recvmsgs(sock, cb);
nlmsg_free(msg);
nl_cb_put(cb);