From d4376788601c38963c4c836d325e3a66498079ea Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Fri, 10 Mar 2017 11:49:44 +0100 Subject: [PATCH] Cancel (re)connect timer when deleting interface MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Firing timeout would cause a crash if interface has been deleted meanwhile. The easiest way to trigger this was calling set_config ubus method twice within 100 ms. Cancel pending interface start before freeing it. Signed-off-by: Rafał Miłecki --- interface.c | 1 + 1 file changed, 1 insertion(+) diff --git a/interface.c b/interface.c index f9fe40a..a09e7ce 100644 --- a/interface.c +++ b/interface.c @@ -153,6 +153,7 @@ static void interface_close(struct interface *iface) static void interface_free(struct interface *iface) { + uloop_timeout_cancel(&iface->reconnect); interface_close(iface); free(iface); } -- 2.25.1